From 3c17f06231480080bfe7d47070566e9f1194d8a6 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Wed, 18 Jan 2023 17:54:45 +0100 Subject: nvim: add per-project settings loader --- neovim/.config/nvim/init.vim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'neovim/.config/nvim') diff --git a/neovim/.config/nvim/init.vim b/neovim/.config/nvim/init.vim index 3013417..1ad29d6 100644 --- a/neovim/.config/nvim/init.vim +++ b/neovim/.config/nvim/init.vim @@ -72,6 +72,8 @@ Plug 'neomake/neomake' " Pre-built configurations for the neovim LSP client Plug 'neovim/nvim-lspconfig' +" Allow for better project-local settings +Plug 'tamago324/nlsp-settings.nvim' " List all symbols in the file Plug 'simrat39/symbols-outline.nvim' @@ -166,6 +168,18 @@ lsp_status.config({ status_symbol = "", }) +-- Set up per-project LSP settings. Place them in the +-- .nlsp-settings/.json +-- file, or use +-- :LspSettings local +require("nlspsettings").setup({ + config_home = vim.fn.stdpath('config') .. '/nlsp-settings', + local_settings_dir = ".nlsp-settings", + local_settings_root_markers_fallback = { '.git' }, + append_default_schemas = true, + loader = 'json', +}) + -- Setup nvim-cmp. local cmp = require'cmp' -- cgit v1.2.3