diff --git a/home/editors/nvim/plugins/lsp/default.nix b/home/editors/nvim/plugins/lsp/default.nix index 87b2c48..2c00cbc 100644 --- a/home/editors/nvim/plugins/lsp/default.nix +++ b/home/editors/nvim/plugins/lsp/default.nix @@ -1,5 +1,10 @@ { - imports = [./servers.nix ./lint.nix ./otter.nix]; + imports = [ + ./servers.nix + ./lint.nix + ./otter.nix + ./lazydev.nix + ]; programs.nixvim = { plugins = { diff --git a/home/editors/nvim/plugins/lsp/lazydev.nix b/home/editors/nvim/plugins/lsp/lazydev.nix new file mode 100644 index 0000000..083a7f8 --- /dev/null +++ b/home/editors/nvim/plugins/lsp/lazydev.nix @@ -0,0 +1,13 @@ +{pkgs, ...}: { + programs.nixvim.plugins.lazydev = { + enable = true; + settings = { + library = [ + { + path = "${pkgs.vimPlugins.snacks-nvim}"; + words = ["Snacks"]; + } + ]; + }; + }; +} diff --git a/home/editors/nvim/plugins/lsp/servers.nix b/home/editors/nvim/plugins/lsp/servers.nix index e932582..46d895e 100644 --- a/home/editors/nvim/plugins/lsp/servers.nix +++ b/home/editors/nvim/plugins/lsp/servers.nix @@ -24,39 +24,7 @@ bashls.enable = true; nixd.enable = true; - lua_ls = { - enable = true; - config.on_init.__raw = - # lua - '' - function(client) - if client.workspace_folders then - local path = client.workspace_folders[1].name - if - path ~= vim.fn.stdpath('config') - and (vim.uv.fs_stat(path .. '/.luarc.json') or vim.uv.fs_stat(path .. '/.luarc.jsonc')) - then - return - end - end - client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, { - runtime = { - version = 'LuaJIT', - path = { - 'lua/?.lua', - 'lua/?/init.lua', - }, - }, - workspace = { - checkThirdParty = false, - library = { - vim.env.VIMRUNTIME - } - } - }) - end - ''; - }; + lua_ls.enable = true; ltex_plus = { enable = true; @@ -84,7 +52,7 @@ jsonls = { enable = true; config.json = { - schemas.__raw = "require('schemastore').json.schemas()"; + schemas.__raw = ''require("schemastore").json.schemas()''; validate.enable = true; }; }; @@ -95,7 +63,7 @@ enable = false; url = ""; }; - schemas.__raw = "require('schemastore').yaml.schemas()"; + schemas.__raw = ''require("schemastore").yaml.schemas()''; }; }; diff --git a/selene.toml b/selene.toml new file mode 100644 index 0000000..9f14671 --- /dev/null +++ b/selene.toml @@ -0,0 +1,4 @@ +std = "vim" + +[lints] +mixed_table="allow"