fix(nvim): Fix lua_ls + selene for vim and Snacks globals
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
{
|
||||
imports = [./servers.nix ./lint.nix ./otter.nix];
|
||||
imports = [
|
||||
./servers.nix
|
||||
./lint.nix
|
||||
./otter.nix
|
||||
./lazydev.nix
|
||||
];
|
||||
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
|
||||
13
home/editors/nvim/plugins/lsp/lazydev.nix
Normal file
13
home/editors/nvim/plugins/lsp/lazydev.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{pkgs, ...}: {
|
||||
programs.nixvim.plugins.lazydev = {
|
||||
enable = true;
|
||||
settings = {
|
||||
library = [
|
||||
{
|
||||
path = "${pkgs.vimPlugins.snacks-nvim}";
|
||||
words = ["Snacks"];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -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()'';
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
4
selene.toml
Normal file
4
selene.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
std = "vim"
|
||||
|
||||
[lints]
|
||||
mixed_table="allow"
|
||||
Reference in New Issue
Block a user