plugins/lsp: add nlsp-settings plugin
This commit is contained in:
parent
a44c17c95a
commit
91e0909ac6
4 changed files with 34 additions and 4 deletions
24
flake.lock
24
flake.lock
|
@ -172,11 +172,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1663146586,
|
"lastModified": 1667969101,
|
||||||
"narHash": "sha256-VCGdyEc5TF0uq+gdU+jesjZcNxptomDunvGtElmAD9I=",
|
"narHash": "sha256-GL53T705HO7Q/KVfbb5STx8AxFs8YgaGY8pvAZC+O7U=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "125efbd96af28ea5d60e00a3eed832ea3f49a93b",
|
"rev": "bbf77421ac51a7c93f5f0f760da99e4dbce614fa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -186,6 +186,23 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nlsp-settings-nvim": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1668009753,
|
||||||
|
"narHash": "sha256-Zy+TPa2aei9ku3eibOXMHCOZ0awqQfjPUdsJok5P088=",
|
||||||
|
"owner": "tamago324",
|
||||||
|
"repo": "nlsp-settings.nvim",
|
||||||
|
"rev": "effb5f50b2ad7d6070e429635384345ca4be078e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "tamago324",
|
||||||
|
"repo": "nlsp-settings.nvim",
|
||||||
|
"rev": "effb5f50b2ad7d6070e429635384345ca4be078e",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nvim-cmp": {
|
"nvim-cmp": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -333,6 +350,7 @@
|
||||||
"luasnip": "luasnip",
|
"luasnip": "luasnip",
|
||||||
"neoformat": "neoformat",
|
"neoformat": "neoformat",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nlsp-settings-nvim": "nlsp-settings-nvim",
|
||||||
"nvim-cmp": "nvim-cmp",
|
"nvim-cmp": "nvim-cmp",
|
||||||
"nvim-lspconfig": "nvim-lspconfig",
|
"nvim-lspconfig": "nvim-lspconfig",
|
||||||
"nvim-orgmode": "nvim-orgmode",
|
"nvim-orgmode": "nvim-orgmode",
|
||||||
|
|
|
@ -61,6 +61,12 @@
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# https://github.com/tamago324/nlsp-settings.nvim
|
||||||
|
nlsp-settings-nvim = {
|
||||||
|
url = "github:tamago324/nlsp-settings.nvim?rev=effb5f50b2ad7d6070e429635384345ca4be078e";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
# https://github.com/glepnir/lspsaga.nvim
|
# https://github.com/glepnir/lspsaga.nvim
|
||||||
lspsaga-nvim = {
|
lspsaga-nvim = {
|
||||||
url = "github:glepnir/lspsaga.nvim?rev=f33bc99d0ed3ed691a58b3339decf4e1933c3f9e";
|
url = "github:glepnir/lspsaga.nvim?rev=f33bc99d0ed3ed691a58b3339decf4e1933c3f9e";
|
||||||
|
@ -168,6 +174,7 @@
|
||||||
"gitsigns-nvim"
|
"gitsigns-nvim"
|
||||||
# lsp
|
# lsp
|
||||||
"nvim-lspconfig"
|
"nvim-lspconfig"
|
||||||
|
"nlsp-settings-nvim"
|
||||||
"lspsaga-nvim"
|
"lspsaga-nvim"
|
||||||
"luasnip"
|
"luasnip"
|
||||||
"nvim-cmp"
|
"nvim-cmp"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ nvim-lspconfig
|
{ nvim-lspconfig
|
||||||
|
, nlsp-settings-nvim
|
||||||
, lspsaga-nvim
|
, lspsaga-nvim
|
||||||
, luasnip
|
, luasnip
|
||||||
, nvim-cmp
|
, nvim-cmp
|
||||||
|
@ -9,7 +10,7 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (builtins) readFile;
|
inherit (builtins) readFile;
|
||||||
lsp = [ nvim-lspconfig lspsaga-nvim ];
|
lsp = [ nvim-lspconfig nlsp-settings-nvim lspsaga-nvim ];
|
||||||
snippets = [ luasnip ];
|
snippets = [ luasnip ];
|
||||||
completions = [
|
completions = [
|
||||||
nvim-cmp # Autocompletion
|
nvim-cmp # Autocompletion
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
local lsp_config = require("lspconfig")
|
local lsp_config = require("lspconfig")
|
||||||
local saga = require("lspsaga")
|
local saga = require("lspsaga")
|
||||||
|
local nlsp_settings = require("nlspsettings")
|
||||||
|
|
||||||
-- See: https://github.com/glepnir/lspsaga.nvim#configuration
|
-- See: https://github.com/glepnir/lspsaga.nvim#configuration
|
||||||
saga.init_lsp_saga({
|
saga.init_lsp_saga({
|
||||||
|
@ -56,6 +57,9 @@ end
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities)
|
capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities)
|
||||||
|
|
||||||
|
-- for local configurations
|
||||||
|
nlsp_settings.setup({})
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
-- See: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
-- See: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||||
--
|
--
|
||||||
|
|
Reference in a new issue