configs/nvim/init.lua
2024-10-21 23:52:27 +13:00

37 lines
778 B
Lua

vim.opt.number = true
vim.opt.relativenumber = true
vim.cmd 'colorscheme habamax'
vim.opt.expandtab = true
vim.opt.tabstop = 8
vim.opt.softtabstop = 0
vim.opt.shiftwidth = 4
vim.opt.smarttab = true
vim.opt.autoindent = true
vim.opt.mouse = 'a'
vim.o.completeopt = "menuone,noinsert,noselect,preview"
vim.api.nvim_create_autocmd('FileType', {
pattern = 'c',
callback = function(args)
vim.lsp.start({
name = 'clangd',
cmd = {'clangd'},
root_dir = vim.fn.expand("."),
})
end,
})
vim.api.nvim_create_autocmd({"InsertCharPre"}, {
callback = function()
vim.lsp.buf.completion()
end
})
vim.api.nvim_create_autocmd({"CursorMovedI"}, {
callback = function()
vim.lsp.buf.hover()
end
})