diff --git a/after/ftplugin/rust.lua b/after/ftplugin/rust.lua deleted file mode 100644 index 711c400..0000000 --- a/after/ftplugin/rust.lua +++ /dev/null @@ -1,9 +0,0 @@ -vim.api.nvim_create_autocmd("LspAttach", { - buffer = 0, - callback = function() - vim.defer_fn(function() - vim.api.nvim_set_hl(0, "@lsp.type.namespace.rust", { link = "Include" }) - vim.api.nvim_set_hl(0, "@lsp.type.macro.rust", { link = "Macro" }) - end, 50) - end, -}) diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index 0cafae7..3f81649 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -1,6 +1,13 @@ -- LANGUAGE SERVERS +local lsp_zero = require('lsp-zero') local lsp_capabilities = require("cmp_nvim_lsp").default_capabilities() +lsp_zero.on_attach(function(client, bufnr) + -- see :help lsp-zero-keybindings + -- to learn the available actions + lsp_zero.default_keymaps({buffer = bufnr}) +end) + -- LUA vim.lsp.config('lua_ls', { settings = { @@ -53,10 +60,6 @@ vim.keymap.set("n", "gf", ":GoFmt", { noremap = true, silent = true, desc = "Go Format" } ) -vim.keymap.set("n", "ff", "lua vim.lsp.buf.format()", - { desc = "Format Code" } -) - -- AUTOCOMPLETION local cmp = require('cmp')