initial commit
This commit is contained in:
commit
179e92ee04
17 changed files with 2377 additions and 0 deletions
19
init.lua
Normal file
19
init.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
require("config.lazy")
|
||||
|
||||
-- Enables LSPs
|
||||
vim.lsp.enable({ "lua_ls", "nixd" })
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
callback = function(ev)
|
||||
local opts = { buffer = ev.buf }
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set("n", "grn", vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set("n", "gra", vim.lsp.buf.code_action, opts)
|
||||
vim.keymap.set("n", "grr", vim.lsp.buf.references, opts)
|
||||
vim.keymap.set("n", "<leader>f", function()
|
||||
vim.lsp.buf.format({ async = true })
|
||||
end, opts)
|
||||
end,
|
||||
})
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue