nixos-config/home/config-files/nvim/init.lua

69 lines
2.4 KiB
Lua
Raw Permalink Normal View History

2024-01-29 11:04:52 +01:00
-- Switch between splits
vim.keymap.set("n", "<C-Right>", "<c-w>l")
vim.keymap.set("n", "<C-Left>", "<c-w>h")
vim.keymap.set("n", "<C-Up>", "<c-w>k")
vim.keymap.set("n", "<C-Down>", "<c-w>j")
vim.keymap.set("n", "<C-L>", "<c-w>l")
vim.keymap.set("n", "<C-H>", "<c-w>h")
vim.keymap.set("n", "<C-K>", "<c-w>k")
vim.keymap.set("n", "<C-J>", "<c-w>j")
2024-01-29 11:04:52 +01:00
-- Escape for exiting terminal mode
2024-10-21 17:00:20 +02:00
vim.keymap.set('t', '<C-Esc>', '<C-\\><C-n>')
2024-01-29 11:04:52 +01:00
-- move selection linewise
vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv")
vim.keymap.set('v', 'K', ":m '<-2<CR>gv=gv")
2024-09-18 20:43:39 +02:00
require("aerial").setup({
-- optionally use on_attach to set keymaps when aerial has attached to a buffer
on_attach = function(bufnr)
-- Jump forwards/backwards with '{' and '}'
-- vim.keymap.set("n", "{", "<cmd>AerialPrev<CR>", { buffer = bufnr })
-- vim.keymap.set("n", "}", "<cmd>AerialNext<CR>", { buffer = bufnr })
end,
})
-- You probably also want to set a keymap to toggle aerial
2024-01-29 11:30:14 +01:00
2024-02-26 22:28:50 +01:00
--nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
--nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
--nmap('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
--nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
--nmap('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
vim.keymap.set('n', 'K', vim.lsp.buf.hover)
vim.keymap.set('n', 'C-k', vim.lsp.buf.signature_help)
vim.keymap.set('n', 'gd', require('telescope.builtin').lsp_definitions)
vim.keymap.set('n', 'gr', require('telescope.builtin').lsp_references)
vim.keymap.set('n', 'gI', require('telescope.builtin').lsp_implementations)
2024-01-29 11:30:14 +01:00
-- Neovide
if vim.g.neovide then
2024-02-26 22:28:50 +01:00
vim.g.neovide_cursor_vfx_mode = "ripple"
2024-01-29 11:30:14 +01:00
2024-02-26 22:28:50 +01:00
vim.g.neovide_cursor_vfx_particle_density = 30.0
2024-09-05 15:50:02 +02:00
vim.g.neovide_transparency = .8
2024-01-29 11:30:14 +01:00
local font_name = "ComicShannsMono Nerd Font Mono:h"
2024-02-26 22:28:50 +01:00
local font_size = 20
vim.o.guifont = font_name .. tostring(font_size)
vim.g.neovide_profiler = false
vim.g.neovide_hide_mouse_when_typing = true
-- Fullscreen keymapping
vim.keymap.set("n", "<leader>FF", function()
if vim.g.neovide_fullscreen then
vim.g.neovide_fullscreen = false
else
vim.g.neovide_fullscreen = true
end
end)
vim.keymap.set("n", "<C-+>", function()
font_size = font_size + 1
vim.o.guifont = font_name .. tostring(font_size)
end)
vim.keymap.set("n", "<C-->", function()
if font_size >= 1 then
font_size = font_size - 1
vim.o.guifont = font_name .. tostring(font_size)
end
end)
2024-01-29 11:30:14 +01:00
end