Comments (4)
Possibly Tree-sitter, but most likely LSP semantic highlights.
Could you please share the output(s) of :Inspect
while hovering both symbols?
from sonokai.
Thank you for reply.
my_var
: @variable.python links to Fg python
Myvar
: @variable.python links to Fg python, @type.python links to BlueItalic python
Actually, after disabling the highlight of treesitter, the two variables have the same color. But then in general the theme looks less nice
from sonokai.
In Python uppercase names are often used for classes, so I assume that Tree-sitter treats all uppercase variables as types.
Using a LSP server with semantic highlights should fix that. It works in combination with Tree-sitter but provides more accurate context.
Otherwise, you can override the highlight for Python types in your init.lua
file, with the side effect that actual Python types will be highlighted like variables:
-- Apply custom highlights on colorscheme change.
-- Must be declared before executing ':colorscheme'.
local grpid = vim.api.nvim_create_augroup('custom_highlights_sonokai', {})
vim.api.nvim_create_autocmd('ColorScheme', {
group = grpid,
pattern = 'sonokai',
callback = function()
local config = vim.fn['sonokai#get_configuration']()
local palette = vim.fn['sonokai#get_palette'](config.style, config.colors_override)
local set_hl = vim.fn['sonokai#highlight']
set_hl('@type.python', palette.fg, palette.none)
end
})
from sonokai.
Very clear, thank you !
from sonokai.
Related Issues (20)
- 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
- Interest in support nvim lsp semantic highlighting? HOT 6
- 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
- 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
- Neovim v0.10.0 Upgrade Color Changes HOT 4
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.