Comments (6)
Constant
and Identifier
are highlighted by using the default foreground nord4
. I've designed it this way because every other group is colored different so the white color is a kind of highlighting. The Constant
should differ from normal variables by their code style since almost every language uses all-upper-case for constants. A workaround could be to add the bold
attribute for constants for a better visual diff.
The Special
group is a bit "special": I've searched many documentations, but was not able to really find which element of a language is defined as special. Could you post a code example so I can test the highlighting?
from vim.
I don't think there's one definition of Special
. It seems to me that most syntax files use this group for important elements that are specific to the language and do not easily fall under other groups.
Awk probably uses Special
for too many things (including all operators and commas) but it's mostly used for special variable names and elements of regular expressions.
BEGIN {
FS = "\t"
some_var = 3
}
/A[[:space:]]B+\$/ {
print $1
}
INI files use Special
for section headings.
[foo]
bar = baz
Lisp uses it for quoted expressions.
(format t "~a" '(1 2 3))
Also, for syntaxes not included in vim by default (at least last time I checked): SWIG and Jinja both use Special
like awk, for predefined variables that are not keywords, but have some built-in functionality.
And those are the ones I encountered so far since I'm trying out Nord.
I also wouldn't agree that Identifier
and Constant
should be left without highlighting because everything else is highlighted. Most of "normal" text in any program is not highlighted by default (without using some tagging or IDE plugins, at least), so if a syntax file defines highlighting for some static elements deemed as Identifier
or Constant
it usually has a reason to. For example, Lua uses Constant
for true
, false
and nil
, and Java uses it for null
.
from vim.
I have to admit that I must have been a little bit "brain-afk" when I implemented the Constant
definition 😱
I use IntelliJ IDEA for almost everything, next to Atom as my normal default UI editor. IntelliJ detects a constant dynamically because it is a IDE, but Vim and the language syntax plugin of course can only define pattern so I confused a Constant
with a user-defined read-only variable 😆
You're totally right that some languages define elements like true
, false
nil
/null
as constants and these should be colored for sure. I'll change it to use nord8
so they're colored as a kind of reserved keyword.
For the Special
definition I'm still not sure if it should have a final color. I checked your code examples and the elements are using the Special
group as a fallback color because the actual group they're assigned to is not defined in Nord.
This can easily be fixed by adding style support for these languages to Nord.
awk
Element | Group |
---|---|
BEGIN |
awkPattern |
FS |
awkVariables |
= |
awkOperator |
\t |
awkSpecialCharacter |
+\$ |
awkSearch , awkRegExp , awkSpecialCharacter |
$1 |
awkFieldVars |
INI
Element | Group |
---|---|
[foo] |
dosiniHeader |
bar = |
dosiniLabel |
Lisp
Element | Group |
---|---|
(1 2 3) |
lispAtomList |
I have to agree for Lisp that both braces are colored by using the Special
group, only the numbers inside are assigned to lispAtomList
. In my option a bad syntax implementation and I don't know why it is not colored by using the base group Delimiter
😕
Since Nord is designed to provide optimized styles to achieve a consistent and uniform coloring across languages I try to add all popular languages and optimize the syntax to be consistent with other languages instead of only defining the base groups which would lead to different results for example a class in Java and a class in other languages like JavaScript or Python.
You can create a issue per language you'd like to see being included and maybe describe which elements should be optimized.
from vim.
I'll create single issues for each of the language mentioned above and implement full highlighting support next weekend.
from vim.
The problem with the Special
group is that many syntax highlighting plugin creator are like "this language element doen't fit in any of the specifi groups so I just put it into Special".
If I'd colorize the Special
group now with for example nord9
some languages would have blue braces, some would have almost every word colored (which makes highlighting useless again) and other languages for debug purposes.
That's why I'll go with the more complex mehod by implementing styles for every plugin/language specific group, but this keeps the theme style consitent and avoids unintentional colorized elements.
from vim.
I've implemented support for all three languages mentioned above in the issues references above this comment. All groups which are using Special
as fallback are now mapped to a matching group.
Please let me know if you find other languages that should have better coloring support or would like to suggest improvements and feel free to open new issues per language.
from vim.
Related Issues (20)
- Possible to override `nord` variables outside the plugin? HOT 2
- Tank you for changing 'master' to 'main'... HOT 1
- Underline doesn't work in windows terminal HOT 7
- Weird Syntax Highlighting for neovim HOT 5
- Theme looks weird on WSL HOT 3
- theme does not set `Terminal` highlight group HOT 3
- Fix image asset URLs after `nord-docs` GitHub flow and `main` branch migration
- Just a question about the laststatus line HOT 1
- Northern Post — The state and roadmap of Nord
- `nordtheme` organization migration
- Possible conflict induced by the name of the repository HOT 2
- Different color between text mode and math mode in LaTeX HOT 2
- Adapt remaining `arcticicestudio` "fade-out" changes
- text.diff not working with Nord Theme HOT 1
- Highligted words in visual mode are invisible in neovim HOT 4
- Can't get theme working in VIM 9.0.1499 HOT 1
- I recently used Nord again
- Installation Documentation Update?
- Error found when updating neovim from 0.9 version to 0.10 HOT 2
- black line in V-LINE mode on vim 9
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 vim.