Fixed angular lsp

This commit is contained in:
Radu Macocian (admac)
2026-03-21 17:48:57 +01:00
parent e1682fe0e8
commit 4aed880aab
6 changed files with 43 additions and 55 deletions
+4 -25
View File
@@ -23,38 +23,17 @@ require('codecompanion').setup({
auth_method = "chatgpt"
},
})
end,
claude_code = function()
return require("codecompanion.adapters").extend("claude_code", { })
end
}
},
strategies = {
chat = {
adapter = "webui",
tools = {
["cmd_runner"] = { auto_submit_errors = true },
["editor"] = { auto_submit_success = false },
["files"] = { auto_submit_success = true }
}
adapter = "claude_code",
},
agent = {
adapter = "webui",
},
opts = {
system_prompt = [[
You are an expert coding assistant operating in agent mode.
When asked about files or code, ALWAYS use the available tools to:
- Read files with the `files` tool before answering questions about them
- Use the `editor` tool to read the current buffer
- Use `cmd_runner` to run tests or shell commands when relevant
Never ask the user to paste file contents — fetch them yourself using tools.
]],
}
},
interactions = {
chat = {
adapter = "webui",
model = "qwen3.5:9b",
},
}
})
vim.keymap.set('n', '<leader>gpt', function() require("codecompanion").chat({strategy = "agent" }) end);
+19 -2
View File
@@ -4,7 +4,24 @@ capabilities.textDocument.completion.completionItem.snippetSupport = true
vim.lsp.config("*", {
capabilities = capabilities
})
-- vim.lsp.config("ts_ls", {})
local project_library_path = vim.fn.getcwd() .. '/node_modules'
local angular_cmd = {
'ngserver',
'--stdio',
'--tsProbeLocations',
project_library_path,
'--ngProbeLocations',
project_library_path .. '@angular/language-server'
}
vim.lsp.config("ts_ls", {})
vim.lsp.config("angularls", {
cmd = angular_cmd,
on_new_config = function(new_config, new_root_dir)
new_config.cmd = angular_cmd
end
})
vim.lsp.config("ruff", {})
vim.lsp.config("cssls", {})
vim.lsp.config("lua_ls", {})
@@ -30,7 +47,7 @@ vim.lsp.config("eslint", {
},
})
vim.lsp.enable({"odoo_ls", "hls", "ruff", "eslint", "cssls", "lua_ls", "lemminx"})
vim.lsp.enable({"angularls", "odoo_ls", "hls", "ruff", "eslint", "cssls", "lua_ls", "lemminx"})
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('user_lsp_attach', { clear = true }),
-1
View File
@@ -1 +0,0 @@
require("nvim_http").setup()
+1 -1
View File
@@ -1,4 +1,4 @@
require 'nvim-treesitter.configs'.setup {
require 'nvim-treesitter.config'.setup {
-- A list of parser names, or "all" (the listed parsers MUST always be installed)
ensure_installed = {
"vimdoc",