foxoman / zed-nim

Nim support for Zed Editor
Apache License 2.0
19 stars 3 forks source link

Type highlighting and commenting behavior #8

Open cvanelteren opened 2 months ago

cvanelteren commented 2 months ago

Could you give the types a highlighting color?

I would also kindly request and commenting shorkey with G-cc in normal mode.

image

zai1208 commented 2 months ago

Do you have an example of any language this works for?

cvanelteren commented 2 months ago

image

cvanelteren commented 2 months ago

Also gcc works in python-mode similar to how it works in doom emacs

cvanelteren commented 2 months ago

Just for references this is how nim-mode looks in doom emacs image

zai1208 commented 2 months ago

if you use int as a function is it also highlighted? also, if you use any other type is it also highlighted? because this is the only line in the python extension that talks about it:

((call
  function: (identifier) @function.builtin)
 (#match?
   @function.builtin
   "^(abs|all|any|ascii|bin|bool|breakpoint|bytearray|bytes|callable|chr|classmethod|compile|complex|delattr|dict|dir|divmod|enumerate|eval|exec|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|isinstance|issubclass|iter|len|list|locals|map|max|memoryview|min|next|object|oct|open|ord|pow|print|property|range|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|vars|zip|__import__)$"))

I am trying to see where I can take it from in the python extension

cvanelteren commented 2 months ago

At least for Python it does so in Zed image

In emacs nim-mode does the same:

image

foxoman commented 2 months ago

Can you please test using this theme created to fully support nim https://github.com/foxoman/nebula-pulse-zed-theme

let me know please

foxoman commented 2 months ago

if you use int as a function is it also highlighted? also, if you use any other type is it also highlighted? because this is the only line in the python extension that talks about it:

((call
  function: (identifier) @function.builtin)
 (#match?
   @function.builtin
   "^(abs|all|any|ascii|bin|bool|breakpoint|bytearray|bytes|callable|chr|classmethod|compile|complex|delattr|dict|dir|divmod|enumerate|eval|exec|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|isinstance|issubclass|iter|len|list|locals|map|max|memoryview|min|next|object|oct|open|ord|pow|print|property|range|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|vars|zip|__import__)$"))

I am trying to see where I can take it from in the python extension

if you could help will be much appreciated

foxoman commented 2 months ago

At least for Python it does so in Zed image

In emacs nim-mode does the same:

image

image

cvanelteren commented 2 months ago

hmm weird using the theme you listed it works

foxoman commented 2 months ago

I could say I am getting close to knowing the issue and will try to figure it out and fix it.