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 = {
|
programs.nixvim = {
|
||||||
plugins = {
|
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;
|
bashls.enable = true;
|
||||||
nixd.enable = true;
|
nixd.enable = true;
|
||||||
lua_ls = {
|
lua_ls.enable = true;
|
||||||
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
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
ltex_plus = {
|
ltex_plus = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -84,7 +52,7 @@
|
|||||||
jsonls = {
|
jsonls = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config.json = {
|
config.json = {
|
||||||
schemas.__raw = "require('schemastore').json.schemas()";
|
schemas.__raw = ''require("schemastore").json.schemas()'';
|
||||||
validate.enable = true;
|
validate.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -95,7 +63,7 @@
|
|||||||
enable = false;
|
enable = false;
|
||||||
url = "";
|
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