added a buncha new LSPs.
This commit is contained in:
parent
f75102b78e
commit
cbf028159f
8 changed files with 120 additions and 12 deletions
|
|
@ -3,5 +3,8 @@ return {
|
||||||
"clangd",
|
"clangd",
|
||||||
for_cat = "C",
|
for_cat = "C",
|
||||||
lsp = {},
|
lsp = {},
|
||||||
|
after=function()
|
||||||
|
require("clangd_extensions").setup({})
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
12
lua/lsp/config.lua
Normal file
12
lua/lsp/config.lua
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"taplo",
|
||||||
|
for_cat = "config",
|
||||||
|
lsp = {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"yamlls",
|
||||||
|
for_cat = "config",
|
||||||
|
lsp = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -85,27 +85,37 @@ require('lze').load {
|
||||||
"conform.nvim",
|
"conform.nvim",
|
||||||
for_cat = "lsp",
|
for_cat = "lsp",
|
||||||
on_require = { "conform" },
|
on_require = { "conform" },
|
||||||
cmd = { "ConformInfo" },
|
cmd = { "ConformInfo" },
|
||||||
keys = { { "<leader>lf", function() require("conform").format({async=true}) end, mode = { "" }, desc = "Format buffer" }, },
|
keys = {
|
||||||
|
{ "<leader>lf", function() require("conform").format({ async = true }) end, mode = { "" }, desc = "Format buffer" },
|
||||||
|
},
|
||||||
after = function()
|
after = function()
|
||||||
require("conform").setup({
|
require("conform").setup({
|
||||||
default_format_opts = {
|
default_format_opts = {
|
||||||
lsp_format = "fallback",
|
lsp_format = "fallback",
|
||||||
},
|
},
|
||||||
|
|
||||||
formatters_by_ft = {
|
|
||||||
nix = { "alejandra" }
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
-- need to figure out how to properly seperate this.
|
||||||
|
if nixInfo("settings", "cat", "config") then
|
||||||
|
require("conform").formatters_by_ft.json = { "jq" }
|
||||||
|
end
|
||||||
|
if nixInfo("settings", "cat", "nix") then
|
||||||
|
require("conform").formatters_by_ft.nix = { "alejandra" }
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ import = "lsp.lua" },
|
|
||||||
{ import = "lsp.python" },
|
|
||||||
{ import = "lsp.C" },
|
{ import = "lsp.C" },
|
||||||
{ import = "lsp.typst" },
|
|
||||||
{ import = "lsp.bash" },
|
{ import = "lsp.bash" },
|
||||||
{ import = "lsp.zk" },
|
{ import = "lsp.config" },
|
||||||
{ import = "lsp.rust" },
|
|
||||||
{ import = "lsp.go" },
|
{ import = "lsp.go" },
|
||||||
|
{ import = "lsp.jsonnet" },
|
||||||
|
{ import = "lsp.lua" },
|
||||||
|
{ import = "lsp.nix" },
|
||||||
|
{ import = "lsp.nushell" },
|
||||||
|
{ import = "lsp.python" },
|
||||||
|
{ import = "lsp.rust" },
|
||||||
|
{ import = "lsp.typst" },
|
||||||
|
{ import = "lsp.zig" },
|
||||||
|
{ import = "lsp.zk" },
|
||||||
}
|
}
|
||||||
|
|
|
||||||
7
lua/lsp/jsonnet.lua
Normal file
7
lua/lsp/jsonnet.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"jsonnet_ls",
|
||||||
|
for_cat = "jsonnet",
|
||||||
|
lsp = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
9
lua/lsp/nix.lua
Normal file
9
lua/lsp/nix.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"nixd",
|
||||||
|
for_cat = "nix",
|
||||||
|
lsp = {},
|
||||||
|
after = function()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
7
lua/lsp/nushell.lua
Normal file
7
lua/lsp/nushell.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"nushell",
|
||||||
|
for_cat = "nushell",
|
||||||
|
lsp = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
7
lua/lsp/zig.lua
Normal file
7
lua/lsp/zig.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"zls",
|
||||||
|
for_cat = "zig",
|
||||||
|
lsp = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
55
module.nix
55
module.nix
|
|
@ -152,7 +152,9 @@ inputs: {
|
||||||
};
|
};
|
||||||
|
|
||||||
config.specs.zk = {
|
config.specs.zk = {
|
||||||
|
name = "zk";
|
||||||
after = ["general" "lazy"];
|
after = ["general" "lazy"];
|
||||||
|
lazy = true;
|
||||||
data = with pkgs.vimPlugins; [
|
data = with pkgs.vimPlugins; [
|
||||||
zk-nvim
|
zk-nvim
|
||||||
];
|
];
|
||||||
|
|
@ -164,6 +166,7 @@ inputs: {
|
||||||
config.specs.typst = {
|
config.specs.typst = {
|
||||||
name = "typst";
|
name = "typst";
|
||||||
after = ["general" "lazy"];
|
after = ["general" "lazy"];
|
||||||
|
lazy = true;
|
||||||
data = with pkgs.vimPlugins; [
|
data = with pkgs.vimPlugins; [
|
||||||
typst-preview-nvim
|
typst-preview-nvim
|
||||||
];
|
];
|
||||||
|
|
@ -176,24 +179,69 @@ inputs: {
|
||||||
config.specs.go = {
|
config.specs.go = {
|
||||||
name = "go";
|
name = "go";
|
||||||
after = ["general" "lazy"];
|
after = ["general" "lazy"];
|
||||||
|
lazy = true;
|
||||||
data = null;
|
data = null;
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
gopls
|
gopls
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config.specs.config = {
|
||||||
|
name = "config";
|
||||||
|
after = ["general" "lazy"];
|
||||||
|
lazy = true;
|
||||||
|
data = null;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
taplo
|
||||||
|
jq
|
||||||
|
yaml-language-server
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
config.specs.jsonnet = {
|
||||||
|
name = "jsonnet";
|
||||||
|
after = ["general" "lazy"];
|
||||||
|
lazy = true;
|
||||||
|
data = null;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
jsonnet-language-server
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
config.specs.zig = {
|
||||||
|
name = "zig";
|
||||||
|
after = ["general" "lazy"];
|
||||||
|
lazy = true;
|
||||||
|
data = null;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
zls
|
||||||
|
];
|
||||||
|
};
|
||||||
|
config.specs.nushell = {
|
||||||
|
name = "nushell";
|
||||||
|
after = ["general" "lazy"];
|
||||||
|
lazy = true;
|
||||||
|
data = null;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
nushell
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
config.specs.nix = {
|
config.specs.nix = {
|
||||||
name = "nix";
|
name = "nix";
|
||||||
after = ["general" "lazy"];
|
after = ["general" "lazy"];
|
||||||
|
lazy = true;
|
||||||
data = null;
|
data = null;
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
alejandra
|
alejandra
|
||||||
|
nixd
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
config.specs.lua = {
|
config.specs.lua = {
|
||||||
name = "lua";
|
name = "lua";
|
||||||
after = ["general" "lazy"];
|
after = ["general" "lazy"];
|
||||||
|
lazy = true;
|
||||||
data = with pkgs.vimPlugins; [
|
data = with pkgs.vimPlugins; [
|
||||||
lazydev-nvim
|
lazydev-nvim
|
||||||
];
|
];
|
||||||
|
|
@ -206,6 +254,7 @@ inputs: {
|
||||||
config.specs.rust = {
|
config.specs.rust = {
|
||||||
name = "rust";
|
name = "rust";
|
||||||
after = ["general" "lazy"];
|
after = ["general" "lazy"];
|
||||||
|
lazy = true;
|
||||||
data = with pkgs.vimPlugins; [
|
data = with pkgs.vimPlugins; [
|
||||||
rustaceanvim
|
rustaceanvim
|
||||||
];
|
];
|
||||||
|
|
@ -218,6 +267,7 @@ inputs: {
|
||||||
config.specs.python = {
|
config.specs.python = {
|
||||||
name = "python";
|
name = "python";
|
||||||
after = ["general" "lazy"];
|
after = ["general" "lazy"];
|
||||||
|
lazy = true;
|
||||||
data = null;
|
data = null;
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
ty
|
ty
|
||||||
|
|
@ -228,7 +278,10 @@ inputs: {
|
||||||
config.specs.C = {
|
config.specs.C = {
|
||||||
name = "C";
|
name = "C";
|
||||||
after = ["general" "lazy"];
|
after = ["general" "lazy"];
|
||||||
data = null;
|
lazy = true;
|
||||||
|
data = with pkgs.vimPlugins; [
|
||||||
|
clangd_extensions-nvim
|
||||||
|
];
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
libclang
|
libclang
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue