-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
astro-ls
does not update changes from external .ts
files in the current workspace
#2467
Comments
need this pr neovim/neovim#21293 i think |
Hummmmmmmm, nice. Makes sense, I tried to achieve that, but no luck. Can you point me in a direction for a possible fix? |
currently no good ways until that pr merge. only way is when you do edit in that file restart server. like do it in a bufwritepost callback. |
I've installed the newer neovim version where the local workspace_capabilities = {
workspace = {
didChangeWatchedFiles = {
dynamicRegistration = true,
},
},
}
-- Inject lsp thingy into nvim-cmp
local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
capabilities = vim.tbl_deep_extend("keep", capabilities, workspace_capabilities)
require("lspconfig").astro.setup({
on_attach = on_attach,
capabilities = capabilities,
flags = flags,
}) Still it does not work? @glepnir @nojnhuh Anything I'm missing? Or is there anything I can do? |
@Odas0R The config you have looks like it should work at first glance. The only difference I notice with mine is that in my local default_caps = {
workspace = {
didChangeWatchedFiles = {
dynamicRegistration = true,
},
},
}
capabilities = vim.tbl_deep_extend(
"keep",
default_caps,
require("cmp_nvim_lsp").default_capabilities()
) I would check the following in Neovim's LSP log with the verbosity turned up to at least
From a quick look at the source code for Astro, I can see where it consumes the notifications, but I don't see where it sends the request to register the capability. |
Thank you for taking the time for the detailed response :) I've been trying multiple things but still no success. I'm not very proficient in how LSP is supposed to work, but the "I don't see where it sends the request to register the capability." makes sense. I guess I'll open an issue there to see if we can get this looked into. I've also seen the Thank you. |
Description
I've been trying to identify the issue but no luck. When I modify a type on e.g
foo.ts
that change is not immediately updated on the astro lsp server, bothtsserver
andastro-ls
are not in sync here and it affects the DX :(Neovim version
NVIM v0.9.0-dev-77-gf175ca9f7
Nvim-lspconfig version
649137c
Operating system and version
Linux pop-os 6.0.12-76060006-generic
Affected language servers
astro-ls
Steps to reproduce
foo.ts
withfoo.ts
it on a.astro
fileActual behavior
My types are NOT updated on
.astro
files when I modify them.Expected behavior
My types are updated on
.astro
files when I modify them.Minimal config
-
LSP log
The text was updated successfully, but these errors were encountered: