From 3c462576538e97840190d8b94b026f89b2f8709f Mon Sep 17 00:00:00 2001 From: Nydragon Date: Tue, 30 Apr 2024 16:16:34 +0900 Subject: [PATCH] update nvim --- nvim/lua/formatter-config.lua | 6 ++++++ nvim/lua/nvim-cmp-config.lua | 2 +- nvim/lua/nvim-lsp-config.lua | 2 ++ nvim/lua/plugins.lua | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/nvim/lua/formatter-config.lua b/nvim/lua/formatter-config.lua index 8be6568..da02827 100644 --- a/nvim/lua/formatter-config.lua +++ b/nvim/lua/formatter-config.lua @@ -25,6 +25,12 @@ local function build() c = { require("formatter.filetypes.c").clangformat, }, + r = { + require("formatter.filetypes.r").styler, + }, + python = { + require("formatter.filetypes.python").black, + }, ["*"] = { require("formatter.filetypes.any").remove_trailing_whitespace, }, diff --git a/nvim/lua/nvim-cmp-config.lua b/nvim/lua/nvim-cmp-config.lua index c8e9fec..5a142b6 100644 --- a/nvim/lua/nvim-cmp-config.lua +++ b/nvim/lua/nvim-cmp-config.lua @@ -34,7 +34,7 @@ cmp.setup({ }, sources = { { name = "path" }, -- file paths - { name = "nvim_lsp", keyword_length = 3 }, -- from language server + { name = "nvim_lsp", keyword_length = 1 }, -- from language server { name = "nvim_lsp_signature_help" }, -- display function signatures with current parameter emphasized { name = "nvim_lua", keyword_length = 2 }, -- complete neovim's Lua runtime API such vim.lsp.* { name = "buffer", keyword_length = 2 }, -- source current buffer diff --git a/nvim/lua/nvim-lsp-config.lua b/nvim/lua/nvim-lsp-config.lua index 89b2ba7..64a8604 100644 --- a/nvim/lua/nvim-lsp-config.lua +++ b/nvim/lua/nvim-lsp-config.lua @@ -48,3 +48,5 @@ require("lspconfig").clangd.setup({}) require("lspconfig").rust_analyzer.setup({}) require("lspconfig").nixd.setup({}) + +require("lspconfig").r_language_server.setup({}) diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index 2126198..ac65e77 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -92,6 +92,7 @@ require("lazy").setup({ "hrsh7th/cmp-nvim-lua", "hrsh7th/cmp-nvim-lsp-signature-help", "hrsh7th/cmp-vsnip", + "hrsh7th/vim-vsnip", }, init = function() require("nvim-cmp-config")