Closed sproott closed 10 months ago
typst-lsp
does send the necessary information though. Put you cursor on the +
, run :Inspect
, and you should be able to see that it's a semanctic token of type @lsp.type.marker.typst
. It's just not highlighted because it does not have a highlight group set. Try, e.g. lua vim.api.nvim_set_hl(0, '@lsp.type.marker.typst', { link = "Error", default = true })
, and it will be highlighted as an error. Doing this config properly isn't the job for the lsp. Maybe open a feature request at https://github.com/kaarmu/typst.vim for this.
I'm using neovim-lspconfig to set up the LSP, I don't have the typst.vim
plugin. But the LSP should be enough. I'm not sure how neovim-lspconfig
handles highlighting, but I'll maybe just open an issue there and see if there's something to be done there.
But the LSP should be enough.
That's wrong. The LSP needs to send the token information, but doing the highlighting from that information is the job of the client.
neovim-lspconfig
It doesn't. There's some blanket configuration in neovim itself (runtime/lua/vim/lsp/semantic_tokens.lua
), but not in neovim-lspconfig. For some reason, the blanket configuration doesn't really apply here (I've no idea why, seems to me the above should link to Type
), but it's still a client problem, not a server problem.
Closing as the LSP server is working properly.
Issue
Highlighting in neovim is almost non-existent compared to VSCode. I have tried different color schemes, but nothing works.
neovim:
VSCode:
Logs