|
@@ -13,11 +13,28 @@ vim.o.clipboard = 'unnamedplus'
|
|
|
|
|
|
vim.wo.relativenumber = true
|
|
vim.wo.relativenumber = true
|
|
|
|
|
|
|
|
+-- [[ Basic Keymaps ]]
|
|
|
|
+
|
|
|
|
+-- Keymaps for better default experience
|
|
|
|
+-- See `:help vim.keymap.set()`
|
|
|
|
+vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
|
|
|
+
|
|
|
|
+-- Remap for dealing with word wrap
|
|
|
|
+vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
|
|
|
+vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
|
|
|
+
|
|
|
|
+-- Diagnostic keymaps
|
|
|
|
+vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' })
|
|
|
|
+vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' })
|
|
|
|
+vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
|
|
|
|
+vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
|
|
|
|
+
|
|
-- Make window management nice
|
|
-- Make window management nice
|
|
vim.api.nvim_set_keymap('n', '<C-Left>', ':vertical resize +3<CR>', { silent = true, noremap = true })
|
|
vim.api.nvim_set_keymap('n', '<C-Left>', ':vertical resize +3<CR>', { silent = true, noremap = true })
|
|
vim.api.nvim_set_keymap('n', '<C-Right>', ':vertical resize -3<CR>', { silent = true, noremap = true })
|
|
vim.api.nvim_set_keymap('n', '<C-Right>', ':vertical resize -3<CR>', { silent = true, noremap = true })
|
|
vim.api.nvim_set_keymap('n', '<C-Up>', ':resize -3<CR>', { silent = true, noremap = true })
|
|
vim.api.nvim_set_keymap('n', '<C-Up>', ':resize -3<CR>', { silent = true, noremap = true })
|
|
vim.api.nvim_set_keymap('n', '<C-Down>', ':resize +3<CR>', { silent = true, noremap = true })
|
|
vim.api.nvim_set_keymap('n', '<C-Down>', ':resize +3<CR>', { silent = true, noremap = true })
|
|
|
|
+
|
|
vim.api.nvim_set_keymap('n', '<C-h>', '<C-w>h', { silent = true, noremap = true })
|
|
vim.api.nvim_set_keymap('n', '<C-h>', '<C-w>h', { silent = true, noremap = true })
|
|
vim.api.nvim_set_keymap('n', '<C-j>', '<C-w>j', { silent = true, noremap = true })
|
|
vim.api.nvim_set_keymap('n', '<C-j>', '<C-w>j', { silent = true, noremap = true })
|
|
vim.api.nvim_set_keymap('n', '<C-k>', '<C-w>k', { silent = true, noremap = true })
|
|
vim.api.nvim_set_keymap('n', '<C-k>', '<C-w>k', { silent = true, noremap = true })
|
|
@@ -33,6 +50,9 @@ vim.api.nvim_set_keymap('i', '<C-H>', '<C-W>', { noremap = true })
|
|
-- Lazygit
|
|
-- Lazygit
|
|
vim.api.nvim_set_keymap('n', '<leader>gg', ':LazyGit<CR>', { noremap = true, silent = true })
|
|
vim.api.nvim_set_keymap('n', '<leader>gg', ':LazyGit<CR>', { noremap = true, silent = true })
|
|
|
|
|
|
|
|
+-- Doc comment generation
|
|
|
|
+vim.api.nvim_set_keymap('n', '<Leader>cd', ":lua require('neogen').generate()<CR>", { noremap = true, silent = true })
|
|
|
|
+
|
|
-- When lyf give you lemons
|
|
-- When lyf give you lemons
|
|
vim.keymap.set('n', '<leader>fml', '<cmd>CellularAutomaton make_it_rain<CR>')
|
|
vim.keymap.set('n', '<leader>fml', '<cmd>CellularAutomaton make_it_rain<CR>')
|
|
|
|
|
|
@@ -77,22 +97,6 @@ vim.o.completeopt = 'menuone,noselect'
|
|
-- NOTE: You should make sure your terminal supports this
|
|
-- NOTE: You should make sure your terminal supports this
|
|
vim.o.termguicolors = true
|
|
vim.o.termguicolors = true
|
|
|
|
|
|
--- [[ Basic Keymaps ]]
|
|
|
|
-
|
|
|
|
--- Keymaps for better default experience
|
|
|
|
--- See `:help vim.keymap.set()`
|
|
|
|
-vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
|
|
|
-
|
|
|
|
--- Remap for dealing with word wrap
|
|
|
|
-vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
|
|
|
-vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
|
|
|
-
|
|
|
|
--- Diagnostic keymaps
|
|
|
|
-vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' })
|
|
|
|
-vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' })
|
|
|
|
-vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
|
|
|
|
-vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
|
|
|
|
-
|
|
|
|
-- [[ Highlight on yank ]]
|
|
-- [[ Highlight on yank ]]
|
|
-- See `:help vim.highlight.on_yank()`
|
|
-- See `:help vim.highlight.on_yank()`
|
|
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
|
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
|
@@ -197,7 +201,7 @@ vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc =
|
|
vim.defer_fn(function()
|
|
vim.defer_fn(function()
|
|
require('nvim-treesitter.configs').setup {
|
|
require('nvim-treesitter.configs').setup {
|
|
-- Add languages to be installed here that you want installed for treesitter
|
|
-- Add languages to be installed here that you want installed for treesitter
|
|
- ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash' },
|
|
|
|
|
|
+ ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash', 'svelte' },
|
|
|
|
|
|
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
|
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
|
auto_install = false,
|
|
auto_install = false,
|
|
@@ -369,6 +373,12 @@ local servers = {
|
|
-- diagnostics = { disable = { 'missing-fields' } },
|
|
-- diagnostics = { disable = { 'missing-fields' } },
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ svelte = {
|
|
|
|
+ filetypes = {
|
|
|
|
+ 'svelte',
|
|
|
|
+ },
|
|
|
|
+ },
|
|
}
|
|
}
|
|
|
|
|
|
-- Setup neovim lua configuration
|
|
-- Setup neovim lua configuration
|