-
Notifications
You must be signed in to change notification settings - Fork 8
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
Randomly opens JSON files from project #199
Comments
Does this happen with |
For reference: LazyVim/LazyVim#3857 |
No Changed it to false and it is not happening again. So seems correlated. |
I confirm |
Will (try to) fix it in the next release |
Disabling this does not seem to fix this for me. Random tsconfig files are opening once the LSP is finished initializing the project's tsconfig.json. The main tsconfig uses references to other configs. local servers = {
clangd = {},
lua_ls = {},
jedi_language_server = {},
eslint = {},
vtsls = {
settings = {
typescript = {
-- https://github.com/yioneko/vtsls/issues/199
tsserver = { experimental = { enableProjectDiagnostics = false } },
updateImportsOnFileMove = { enabled = "always" },
suggest = {
completeFunctionCalls = true,
},
inlayHints = {
parameterNames = { enabled = "literals" },
parameterTypes = { enabled = true },
variableTypes = { enabled = true },
propertyDeclarationTypes = { enabled = true },
functionLikeReturnTypes = { enabled = true },
enumMemberValues = { enabled = true },
},
},
},
},
}
require("mason").setup()
vim.lsp.set_log_level("debug")
local ensure_installed = vim.tbl_keys(servers)
-- Add other tools to install here
vim.list_extend(ensure_installed, {
"stylua",
{ "ruff", version = "0.8.2" },
"mypy",
"vtsls",
})
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
require("mason-lspconfig").setup({
handlers = {
function(server_name)
-- From kickstart.nvim
local server = servers[server_name] or {}
server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {})
require("lspconfig")[server_name].setup(server)
end,
},
}) |
Having I think one problem related to this plugin.
In some projects, it occurred in two different ones, while I am editing a TS/JS/React file nvim will randomly opens JSON files in the current buffer. If I am in a popup it will put it there, otherwise in the main buffer.
Cannot be 100% sure it is vtsls problem and trying to narrow it down.
For now I switched back to typescript-tools.
I will try to reproduce and if possible make it reproducible and you can understand that it is not easy to do because it happens on private company repo projects.
My config is here:
https://gitlab.com/gomezantoine/dotfiles/-/blob/master/.config/nvim/lua/antoine/lsp/typescript.lua?ref_type=heads
The text was updated successfully, but these errors were encountered: