Sender | Message | Time |
---|---|---|
11 Jul 2024 | ||
@flux:matrix.org left the room. | 12:42:38 | |
steveej joined the room. | 18:16:23 | |
12 Jul 2024 | ||
bashonly left the room. | 17:19:12 | |
gabihodoroaga joined the room. | 18:18:03 | |
mExplorer | Hi, Lapce shows me the option Restart to update to 4.04 . But after the restart it's further sticking on 0.3.1. How can I get the current version? | 20:29:38 |
pj | download from website or github | 20:30:11 |
mExplorer | I've installed it for a while via git clone / cargo build --release .How can I clean deinstall it, bevor downloading the new version, for example as a deb package.? | 20:32:09 |
pj | there is no installation via cargo build | 20:32:39 |
mExplorer | I've this folder structure, not only a binary:
| 20:46:49 |
16 Jul 2024 | ||
steveej | hey, would someone guide me on the architecture of syntax highlighting? i'm interested in adding it for the Nix language. i'd like to start by understanding why the Nix LSP plugin doesn't add syntax highlighting, and whether it architecturally could | 15:47:21 |
tmpod | Syntax highlighting is done either through TreeSitter or an LSP. The former is a incremental parser generator that supports useful AST queries that can be used to implement syntax highlighting, while the latter is a protocol for handling IDE-level language features, including semantic syntax highlighting. | 16:02:38 |
tmpod | I think it's always worth having a TreeSitter grammar, as it provides really good and lightweight syntax highlighting (and more advanced features such as smarter text objects for vim and the like) | 16:03:34 |
tmpod | But if you want real language support, you'll need to use/make an LSP server. | 16:04:01 |
tmpod | I'm not entirely familiar with Lapce's arch, but I believe the TS stuff is built into the editor itself, while LSP is included through the plugin system (which works with WASI bundles) | 16:06:15 |
pj | In reply to @steveej0:matrix.orgbecause it's missing highlight queries | 16:19:02 |
pj | if it's already added, if not then it needs to be added to grammar list and compiled | 16:19:45 |
pj | https://docs.lapce.dev/features/syntax-highlighting#queries | 16:54:42 |
steveej | In reply to @panekj:matrix.org thanks! so i grabbed the file from https://raw.githubusercontent.com/nix-community/tree-sitter-nix/master/queries/highlights.scm and put it in maybe related, i'm getting the following error on start:
| 17:35:58 |
steveej | oh, it actually works for some nix files! it doesn't work for flake.nix files, for default.nix files it does. | 17:37:44 |
pj | Recommend restarting if you didn't, but also grammar is probably outdated | 17:38:09 |
pj | or the highlight query might be not for this version of grammar | 17:38:23 |
steveej | is the file at that URL what you would expect? | 17:38:49 |
steveej | it doesn't specify a file pattern, i wonder why it doesn't work for all filenames | 17:40:22 |
steveej | it's not the content. if i just cp flake.nix default.nix the latter gets syntax highlighting whereas the former doesn't | 17:41:05 |
pj | it applies to all files with .nix extension | 17:41:13 |
steveej | i agree it should, it doesn't do it though | 17:41:36 |
steveej | Download image.png | 17:43:57 |
steveej | now i'm also realizing that most nix files do syntax highlighting without that highlights.scm in my homedir. just flake.nix don't 🤔 | 17:47:59 |
pj | which lapce version are you using? | 17:50:04 |
steveej | v0.4.0 | 17:50:31 |