Comments (6)
Not a specific issue, but a lot of issues.
As far as I can tell, the treesitter parsing is identical, but the highlighting is completely different/wrong.
from sonokai.
@
highlight groups do break Vim as well as Neovim versions lower than 0.8.0. They need to be added behind this conditional:
Line 500 in a4d96b6
I'm also using Neovim 0.9.0 and LSP highlights seem to be working without further changes. Are you having any specific issue?
from sonokai.
Good point, it seems like Neovim 0.9.0 links LSP highlight groups to Vim's default groups, whereas this colorscheme uses different highlighting paradigms whether the code is highlighted using classic Vim syntax or Treesitter. We should re-link those to Treesitter highlights.
from sonokai.
Ok, linking the lsp variables I was able to get this:
with this diff:
diff --git i/colors/sonokai.vim w/colors/sonokai.vim
index a85a823..974e605 100644
--- i/colors/sonokai.vim
+++ w/colors/sonokai.vim
@@ -579,6 +579,28 @@ if has('nvim-0.8.0')
highlight! link @variable TSVariable
highlight! link @variable.builtin TSVariableBuiltin
endif
+if has('nvim-0.9.0')
+ highlight! link @lsp.type.type TSType
+ highlight! link @lsp.type.class TSType
+ highlight! link @lsp.type.enum TSType
+ highlight! link @lsp.type.interface TSType
+ highlight! link @lsp.type.struct TSType
+ highlight! link @lsp.type.typeParameter TSType
+ highlight! link @lsp.type.parameter TSParameter
+ highlight! link @lsp.type.variable TSVariable
+ highlight! link @lsp.type.property TSProperty
+ highlight! link @lsp.type.enumMember TSProperty
+ highlight! link @lsp.type.events TSLabel
+ highlight! link @lsp.type.function TSFunction
+ highlight! link @lsp.type.method TSMethod
+ highlight! link @lsp.type.keyword TSKeyword
+ highlight! link @lsp.type.modifier TSOperator
+ highlight! link @lsp.type.comment TSComment
+ highlight! link @lsp.type.string TSString
+ highlight! link @lsp.type.number TSNumber
+ highlight! link @lsp.type.regexp TSStringRegex
+ highlight! link @lsp.type.operator TSOperator
+endif
" }}}
" github/copilot.vim {{{
highlight! link CopilotSuggestion Grey
which is more-or-less a copy paste of the LspSemantic*
tokens, but replacing them with the @lsp.type.*
ones. So much improved, but the diagnostic (highlighting at the very top) is still wrong (greyed out, should at least be underlined).
from sonokai.
Thanks a lot for the initial investigation!
About the diagnostic message, is the example with or without g:sonokai_diagnostic_text_highlight = 1
?
from sonokai.
About the diagnostic message, is the example with or without
g:sonokai_diagnostic_text_highlight = 1
?
That's without that setting. I discovered through :Inspect
(new 0.9.0 command, very nice, much like) that the highlight group for it was DiagnosticUnnecessary
, which wasn't handled by the sonokai color scheme. Adding:
highlight! link DiagnosticUnnecessary WarningText
to the same if statement block above gets that back to normal. I just chose WarningText
as it's what is used for DiagnosticUnderlineWarn
.
Now I get this:
which I think is correct. lsp is now correctly overriding TS to see it as a function declaration rather than a variable to the function CEED_QFUNCTION
(which is just a macro).
from sonokai.
Related Issues (20)
- A lot of highlight warning. HOT 2
- How to change style to Andromeda in lua? HOT 2
- Emacs Port? HOT 4
- bufferline HOT 3
- Can't have transparent background Everywhere HOT 3
- How to set Espresso mode? HOT 2
- Nvim-navic has wrong background color in statusline from lualine HOT 5
- LSP saga floating window design HOT 9
- Support Neo-tree.nvim HOT 5
- help with folke/noice.nvim and mini view HOT 5
- Configuration for dim float window style HOT 2
- Questions: Better way to highlight variable with {} in shell script HOT 1
- Question: Better highlighter command support for Dockerfile with treesitter HOT 6
- Support vim HOT 3
- Variables starting with uppercase letter have different color HOT 4
- Add support for NotifyBackground HOT 1
- Would you be interested in a PR for a new palette? HOT 4
- Is there a way to toggle the transparency setting at runtime? HOT 7
- xresources, base16-snazy HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sonokai.