42 lines
1.0 KiB
Lua
42 lines
1.0 KiB
Lua
vim.g.mapleader = " "
|
|
vim.o.number = true
|
|
vim.o.relativenumber = true
|
|
vim.o.wrap = true
|
|
vim.o.winborder = "rounded"
|
|
|
|
-- vim.o.signcolumn = "no"
|
|
vim.o.signcolumn = "yes"
|
|
vim.o.tabstop = 2
|
|
vim.o.shiftwidth = 2
|
|
vim.o.expandtab = true
|
|
vim.o.breakindent = true
|
|
vim.o.smartindent = true
|
|
vim.o.undofile = true
|
|
vim.o.swapfile = false
|
|
vim.o.backup = false
|
|
|
|
vim.o.clipboard = 'unnamedplus'
|
|
|
|
vim.o.autocomplete = true
|
|
vim.opt.completeopt = { 'menuone', 'noselect', 'noinsert' }
|
|
vim.opt.shortmess:append('c')
|
|
|
|
vim.keymap.set('n', 'gl', vim.diagnostic.open_float)
|
|
|
|
vim.o.pumheight = 5
|
|
vim.o.pumborder = 'rounded'
|
|
|
|
vim.g.vimtex_view_method = "zathura"
|
|
vim.cmd("filetype plugin indent on")
|
|
|
|
vim.api.nvim_create_autocmd('LspAttach', {
|
|
group = vim.api.nvim_create_augroup('my.lsp', {}),
|
|
callback = function(ev)
|
|
local client = assert(vim.lsp.get_client_by_id(ev.data.client_id))
|
|
if client:supports_method('textDocument/completion') then
|
|
vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
|
|
end
|
|
end,
|
|
})
|
|
vim.cmd("syntax enable")
|