Closed JoshuaCrewe closed 1 year ago
Check :hi @constant.sh
to check the rules look as you expect, otherwise this will be a filetype/treesitter/nvim issue not Lush. Also be sure some other file isn't clobbering your setup.
@rktjmp :hi @constant.sh
does return the value I would expect :
it isn't applying it which means that ... I am actually not sure what this means. Something else is clobbering it? :set ft?
does come back with sh
but perhaps it uses something else to define what the file is and which overrides to apply?
I'm not sure how you'd inspect it, but perhaps .env
isn't actually applying the sh
treesitter parser? I'm not sure if setting the ft=sh is enough to actually "load and run sh
treesitter to this file" or not?
I had a look here https://github.com/nvim-treesitter/nvim-treesitter/tree/master/queries and could not see sh
, only bash
, fish
, etc. Have you tried ft=bash
?
However it goes, it looks to me like its applying @constant
, so it is never setting your X=
to "constant as found by the sh
parser" or whatever, as far as I can tell.
@rktjmp bingo.
sym("@constant.bash") { fg = 'Red' },
That works. TIL filetype
!= treesitter parser (thing)
Thanks so much for your input I learned a lot!
When editing an
.env
file I can't seem to set overrides based on file type. The filetype for an.env
issh
for which I have the following override :If I change the filetype and the override to
javascript
then it works fine :It looks like the
sh
override isn't working but I could be doing something wrong.