1
0
Files
dotfiles/.config/nvim/init.lua

53 lines
1.3 KiB
Lua

vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = false
vim.opt.ignorecase = true
vim.opt.smartcase = true
vim.opt.ruler = true
vim.opt.backup = false
vim.opt.number = true
vim.opt.colorcolumn = "120"
vim.opt.exrc = true
vim.opt.secure = true
vim.opt.hidden = true
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
vim.opt.shortmess:append('c')
-- Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
-- delays and poor user experience.
vim.opt.updatetime = 300
-- Always show the signcolumn, otherwise it would shift the text each time
-- diagnostics appear/become resolved.
-- Recently vim can merge signcolumn and number column into one
vim.opt.signcolumn = 'yes'
vim.opt.mouse = 'a' -- " Enable mouse in all modes.
--
-- Plugin management
--
require("config.lazy")
require("config.lspserver")
--
-- Theme
--
vim.opt.termguicolors = true
-- Mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
local opts = { noremap = true, silent = true }
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
-- Custom file types.
vim.filetype.add({
extension = {
elna = 'elna'
}
})