feat: unocss lsp
This commit is contained in:
@@ -81,6 +81,14 @@ local lsps = {
|
||||
["templ"] = {},
|
||||
["ts_ls"] = {},
|
||||
["rust_analyzer"] = {},
|
||||
["unocss"] = function()
|
||||
-- local unocss = require("lspconfig.configs")["unocss"]
|
||||
return {
|
||||
filetypes = {
|
||||
"templ",
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -90,6 +98,10 @@ return {
|
||||
after = function()
|
||||
local lsp = require("lspconfig")
|
||||
for k, v in pairs(lsps) do
|
||||
if type(v) == "function" then
|
||||
v = v()
|
||||
end
|
||||
|
||||
v.capabilities = require("blink.cmp").get_lsp_capabilities(v.capabilities)
|
||||
lsp[k].setup(v)
|
||||
end
|
||||
|
||||
@@ -83,6 +83,11 @@
|
||||
typescript-language-server
|
||||
rust-analyzer
|
||||
vscode-langservers-extracted
|
||||
|
||||
# Temporally solution since there isn't a easy way to install pnpm packages
|
||||
(pkgs.writeShellScriptBin "unocss-language-server" ''
|
||||
${lib.getExe pkgs.bun} x unocss-language-server@0.1.5 "$@"
|
||||
'')
|
||||
];
|
||||
|
||||
packages = with pkgs; [
|
||||
|
||||
Reference in New Issue
Block a user