From 5ce9a6842dd8201b147d161ee44a8b6d38c38e58 Mon Sep 17 00:00:00 2001 From: yyasha Date: Mon, 9 Sep 2024 14:34:02 +0300 Subject: [PATCH] update nvim --- nvim/lua/chadrc.lua | 2 +- nvim/lua/configs/lspconfig.lua | 8 +++++++- nvim/lua/mappings.lua | 2 ++ nvim/lua/plugins/init.lua | 18 ++++++++---------- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/nvim/lua/chadrc.lua b/nvim/lua/chadrc.lua index 05857e3..73a45fc 100644 --- a/nvim/lua/chadrc.lua +++ b/nvim/lua/chadrc.lua @@ -6,7 +6,7 @@ local M = {} M.ui = { theme = "palenight", - theme_toggle = {"doomchad", "palenight",}, + theme_toggle = {"palenight", "palenight",}, statusline = { theme = "default" diff --git a/nvim/lua/configs/lspconfig.lua b/nvim/lua/configs/lspconfig.lua index 8c6efcb..992b0ee 100644 --- a/nvim/lua/configs/lspconfig.lua +++ b/nvim/lua/configs/lspconfig.lua @@ -47,7 +47,13 @@ lspconfig.gopls.setup({ }, }) -lspconfig.clangd.setup{} +lspconfig.clangd.setup{ + on_attach = function (client, bufnr) + client.server_capabilities.signatureHelpProvider = false + on_attach(client, bufnr) + end, + capabilities = capabilities +} -- typescript -- lspconfig.tsserver.setup { diff --git a/nvim/lua/mappings.lua b/nvim/lua/mappings.lua index 783b78f..cfed478 100644 --- a/nvim/lua/mappings.lua +++ b/nvim/lua/mappings.lua @@ -8,3 +8,5 @@ map("n", ";", ":", { desc = "CMD enter command mode" }) map("i", "jk", "") -- map({ "n", "i", "v" }, "", " w ") + +map("n", 'fr', function() vim.lsp.buf.references() end, { desc = "References" }) diff --git a/nvim/lua/plugins/init.lua b/nvim/lua/plugins/init.lua index 7a8b224..9e109bd 100644 --- a/nvim/lua/plugins/init.lua +++ b/nvim/lua/plugins/init.lua @@ -48,20 +48,18 @@ return { ensure_installed = { "lua-language-server", "clangd", + "clang-format", "stylua", "gopls", "golangci-lint", }, }, }, - -- - -- { - -- "nvim-treesitter/nvim-treesitter", - -- opts = { - -- ensure_installed = { - -- "vim", "lua", "vimdoc", - -- "html", "css" - -- }, - -- }, - -- }, + { + "jose-elias-alvarez/null-ls.nvim", + event = "VeryLazy", + opts = function () + return require "configs.null-ls" + end + } }