fix: stuff

This commit is contained in:
2024-06-10 19:08:43 +02:00
parent b801064f84
commit d18b3d1683
11 changed files with 154 additions and 161 deletions

View File

@@ -21,8 +21,8 @@ in
"--ngProbeLocations"
""
];
on_new_config = {
__raw = ''
on_new_config.__raw = # lua
''
function(new_config, new_root_dir)
new_config.cmd = {
new_root_dir .. "/node_modules/@angular/language-server/bin/ngserver",
@@ -34,7 +34,6 @@ in
}
end
'';
};
filetypes = [
"typescript"
"html"
@@ -43,15 +42,14 @@ in
"angular"
"html.angular"
];
on_attach = {
__raw = ''
on_attach.__raw = # lua
''
function(client, bufnr)
if vim.bo[bufnr].filetype == "html" then
vim.bo[bufnr].filetype = "angular"
end
end
'';
};
};
}
];

View File

@@ -15,21 +15,24 @@ in
};
config = lib.mkIf cfg.enable {
extraConfigLua = lib.mkIf cfg.npm ''
require("cmp-npm").setup({})
'';
extraConfigLua =
lib.mkIf cfg.npm # lua
''
require("cmp-npm").setup({})
'';
plugins = {
lspkind = lib.mkIf cfg.npm {
cmp.after = ''
function(entry, vim_item, kind)
if entry.source.name == "npm" then
kind.kind = ""
kind.kind_hl_group = "CmpItemKindNpm"
cmp.after = # lua
''
function(entry, vim_item, kind)
if entry.source.name == "npm" then
kind.kind = ""
kind.kind_hl_group = "CmpItemKindNpm"
end
kind.kind = kind.kind .. " "
return kind
end
kind.kind = kind.kind .. " "
return kind
end
'';
'';
};
cmp.settings.sources = lib.mkIf cfg.npm [
{

View File

@@ -15,7 +15,7 @@ in
config = lib.mkIf cfg.enable {
plugins = {
conform-nvim.formattersByFt.nix = [ "nixfmt" ];
lsp.servers.nil_ls.enable = true;
lsp.servers.nil-ls.enable = true;
nix.enable = true;
};
extraPackages = [ pkgs.nixfmt-rfc-style ];