Skip to main content

Questions tagged [syntax-highlighting]

Syntax highlighting is the use of colours, size, typeface, or other attributes to visually indicate it has a special meaning and therefore make it easier to understand the text. For example, marking language keywords with a specific colour.

1 vote
0 answers
32 views

I am writing some Go code in VIM - Vi IMproved 9.1 on a Lubuntu laptop. From around line 800 onward (my file has currently around +-1200 lines) Vim can not recognize strings and the syntax-...
Student's user avatar
  • 139
1 vote
0 answers
36 views
+150

I'm using treesitter inside neovim, for all of the awesome reasons we already know. My (legacy) code has a lot of SQL statements in PHP strings. Using TS I've got it to recognise SQL inside PHP ...
Codemonkey's user avatar
2 votes
1 answer
641 views

As far as I know, I can set Bash syntax highlighting for a buffer with :set syntax=bash. So I open a new buffer and insert ls -d [1-4], and do :set syntax=bash. Then, I see that 1 in 1-4 is colored ...
decision-making-mike's user avatar
0 votes
1 answer
50 views

(This is a second attempt at solving the underlying problem from `hi clear` in colorscheme unsetting certain LaTeX highlights, posted in response to comments made under Maxim Kim's answer.) I am using ...
jwodder's user avatar
  • 179
1 vote
3 answers
126 views

I am but a simple man… I work on a black-background, light-gray foreground terminal, and I am a long-time, but in no way an expert, user of Vim. Disliking the default color scheme, many years ago I ...
einpoklum's user avatar
  • 121
1 vote
1 answer
110 views

I am using Vim 9.1.1800, installed via Homebrew on macOS Sonoma 14.7.8. Currently, when I open the following minimal *.tex document in Vim: \documentclass{article} \begin{document} \textbf{Bold} and \...
jwodder's user avatar
  • 179
1 vote
2 answers
66 views

I created a new custom file type called foo: $ cat ~/.vim/ftdetect/foo.vim au BufRead,BufNewFile *.foo set filetype=foo I created a new syntax group: $ cat ~/.vim/after/syntax/foo.vim syntax keyword ...
bofo's user avatar
  • 33
2 votes
1 answer
89 views

My script includes synID() but does not work on a help file after nvim 0.10.0. It is because nvim starts to use treesitter highlighting and does not set the syntax option. Is there any alternative ...
Rick Howe's user avatar
  • 423
0 votes
1 answer
115 views

The goal is to highlight text inside [...] with a different color than text inside ![...]! Also everything should be nestable such that [...] could contain ![...]! inside of it or vice versa and the ...
yousefx0's user avatar
1 vote
1 answer
78 views

I have installed the up-to-date tree-sitter-typescript, and it works well in typescript files without shebang. I searched online but couldn't find any particularly similar questions. Some people ...
WeariTraveller's user avatar
1 vote
1 answer
106 views

I have a special format in .html.specialext, it is basically an HTML file with special regions delimited by {{ and }}, containing Lua code. Here is my syntax file (specialext.vim): if exists("b:...
TummaLumi's user avatar
0 votes
0 answers
85 views

I have this right now, local servers = { pyright = vim.tbl_deep_extend('force', default_settings, { settings = { python = { analysis = { ...
six's user avatar
  • 1
2 votes
2 answers
477 views

I'm using gVim v9.1 on Microsoft Windows 10. I tried to get syntax highlighting going for CNC Gcode files but ran into all sorts of problems. I looked up the Vim documentation and searched on the ...
PapaAtHome's user avatar
1 vote
1 answer
191 views

I'm using nvim v0.11.1 with nvim-treesittter. I often edit Python code with strings containing SQL, and I would like to apply highlighting on the SQL strings. I've created a file ~/.config/nvim/...
David Froger's user avatar
1 vote
0 answers
97 views

If I open the file popup.vim in vim and go to the bottom with G, then scrolling upwards with k is extremely laggy. The problem only occurs if I hold down k, pressing it repeatedly it works fine. ...
sro5h's user avatar
  • 163

15 30 50 per page
1
2 3 4 5
53