summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/nvim/init.lua16
1 files changed, 12 insertions, 4 deletions
diff --git a/config/nvim/init.lua b/config/nvim/init.lua
index ea8a3d2..dc96c1a 100644
--- a/config/nvim/init.lua
+++ b/config/nvim/init.lua
@@ -3,7 +3,7 @@ require("plugins")
vim.g.mapleader = ' '
vim.opt.background = "dark"
vim.opt.clipboard = "unnamedplus" -- Use system clipboard
-vim.opt.list = true -- Show spaces, tabs, etc.
+-- vim.opt.list = true -- Show spaces, tabs, etc.
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.shortmess:append("I") -- Disable intro message
@@ -40,16 +40,24 @@ vim.api.nvim_create_autocmd("FileType", {
end,
})
+-- Enable spellcheck for certain file types
+vim.api.nvim_create_autocmd("FileType", {
+ pattern = {
+ "gitcommit", "markdown", "text", "rst",
+ "asciidoc", "org", "norg", "latex", "tex", "mail", "pandoc"
+ },
+ callback = function()
+ vim.opt_local.spell = true
+ end,
+})
-- NOTE: On some terminal emulators, the keybinds
-- <C-j> and <C-k> don't work either in normal or insert mode.
-- Tabs
vim.keymap.set('n', '<C-t>', '<cmd>tabnew<CR>' , { noremap = true, silent = true })
-vim.keymap.set('n', 'H' , '<cmd>wincmd h<CR>', { noremap = true, silent = true })
vim.keymap.set('n', 'J' , '<cmd>tabn<CR>' , { noremap = true, silent = true })
vim.keymap.set('n', 'K' , '<cmd>tabp<CR>' , { noremap = true, silent = true })
-vim.keymap.set('n', 'L' , '<cmd>wincmd l<CR>', { noremap = true, silent = true })
-- Windows
vim.keymap.set('n', '<C-Down>' , '<cmd>split<CR>' , { noremap = true, silent = true })
@@ -71,4 +79,4 @@ vim.keymap.set('n', '<leader>e', '<cmd>Neotree toggle right<CR>', { noremap = tr
-- Other
vim.keymap.set('n', '<leader><leader>', '<cmd>w!<CR>' , { noremap = true, silent = true })
-vim.keymap.set('n', '<leader>q' , '<cmd>wq!<CR>', { noremap = true, silent = true })
+vim.keymap.set('n', '<leader>q' , '<cmd>wqa!<CR>', { noremap = true, silent = true })