GoThread
appearance log in
home all local communities
c/nix@programming.dev

Nix / NixOS

log in to join
follow from another instance

Not on this instance? Enter your own instance's domain to go straight to following c/nix@programming.dev there.

hashtags

#nix
0
c/nix@programming.dev · hallettj@leminal.space · 4 May 2026 21:17

Embedded SQL highlighting in Neovim, a look into Treesitter, and some NixOS patching

#nix
sitr.us Embedded SQL highlighting in Neovim, a look into Treesitter, and some NixOS patching This is the story of the rabbit hole I went down because I wanted pretty syntax highlighting for embedded SQL queries in my Rust code. I’m a fan of sqlx, which provides macros for writing inline SQL with real-time type checking. Because the queries are in Rust strings the whole query is highlighted uniform green by default. That’s not acceptable! By the end of my journey I had highlighting looking like this: In most cases this kind of embedded syntax highlighting is easy in Neovim, and it’s often set up by default if you use the nvim-treesitter plugin. But I ran into some issues in this particular case. That led me to learn some things about Treesitter, and about how nixpkgs packages Neovim plugins, and Treesitter packages. If you care to follow along, you’ll hear a tale of Neovim, Treesitter, injection queries, patching, NixOS, and more patching!… sitr.us

check post at origin

0 comments

0 comments

log in to comment.

about

Main links

  • website
  • wiki
  • matrix

Videos

  • Linux Experiment about NixOS
  • Chris Titus Tech
  • Mental Outlaw
members
2948
posts
48
created
15 Jun 2023
active / week
0
active / month
5

moderators

  • @erlingur@programming.dev
  • @ballmerpeaking@programming.dev
  • @WhiteBlackGoose@programming.dev

rss · modlog

GoThread · self-hosted threadiverse · instances · modlog · rss · appearance · AGPL-3.0