-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
LSP delete code before save buffer unexpectedly if there exists syntax error when use crystallize as LSP server. #41
Comments
BTW, in some cases(possible syntax error too), LSP will always revert my changes whens i save changes. |
I have noticed this too and have had to disable crystalline as a consequence. I haven't been able to find a pattern/reliable way to reproduce it. |
This is most certainly one of the most annoying issues I've faced recently |
I am not facing this issue on mac with vscode (or very rarely). I am also not planning to work on crystalline anytime soon, so PRs are welcome if anyone is up for it. |
The issue @zw963 and I are having with it undoing the changes you make on save seem to be related to the formatter. Turning off formatting on save would probably work as a temporary solution (if I can figure that one out in neovim). |
I am not using LSP with Crystal for a long time ... |
If anyone comes across this issue using Example for return {
"neovim/nvim-lspconfig",
opts = {
setup = {
crystalline = function(_, opts)
opts.on_attach = function(client)
client.server_capabilities.documentFormattingProvider = false
client.server_capabilities.documentRangeFormattingProvider = false
end
end,
},
},
} If you're not using local lspconfig = require('lspconfig')
lspconfig.crystalline.setup {
on_attach = function(client, _bufnr)
client.server_capabilities.documentFormattingProvider = false
client.server_capabilities.documentRangeFormattingProvider = false
end
} I'm personally using |
Following is the log come from emacs lsp client, thank you.
The text was updated successfully, but these errors were encountered: