Skip to content

Properly specify lang tags#268

Open
PerchunPak wants to merge 1 commit into0xc000022070:mainfrom
PerchunPak:proper-lang-tags
Open

Properly specify lang tags#268
PerchunPak wants to merge 1 commit into0xc000022070:mainfrom
PerchunPak:proper-lang-tags

Conversation

@PerchunPak
Copy link
Copy Markdown

@PerchunPak PerchunPak commented Feb 28, 2026

#261 attempted to introduce language tags, but that did not work for me (in NeoVim, it did not highlight code blocks as expected) and raised a bunch of deprecation warnings by Lix. This introduces them properly (and btw please consider using nixfmt, it is already de-jure standart and adopted in nixpkgs)

warning: Whitespace calculations for indentation stripping in a multiline ''-string include the first line, so putting text on it will effectively disable all indentation stripping. To fix this, simply break the line right after the string starts. Use --extra-deprecated-features broken-string-indentation to silence this warning.
         at /nix/store/wxlsi86bzplwnfqvcaxmcc686prncn4n-source/hm-module/places.nix:502:85:
            501|
            502|           updateScript = pkgs.writeShellScript "zen-sessions-update-${profileName}" ''            # bash
               |                                                                                     ^
            503|             SESSIONS_FILE="${sessionsFile}"

Copy link
Copy Markdown
Member

@luisnquin luisnquin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it doesn't highlight the code blocks on my end. Lix shouldn't care about it.

@luisnquin
Copy link
Copy Markdown
Member

Two options here:

  1. Remove the language tags to avoid the Lix warnings.

  2. Introduce nixfmt in this repository, although language tags will not work for me until I switch my editor extension.

@PerchunPak
Copy link
Copy Markdown
Author

Now it doesn't highlight the code blocks on my end. Lix shouldn't care about it.

What are you using?

@luisnquin
Copy link
Copy Markdown
Member

Now it doesn't highlight the code blocks on my end. Lix shouldn't care about it.

What are you using?

This extension

@PerchunPak
Copy link
Copy Markdown
Author

Can you try https://github.com/nix-community/vscode-nix-ide? This is the LSP for Nix

@luisnquin
Copy link
Copy Markdown
Member

Can you try nix-community/vscode-nix-ide? This is the LSP for Nix

I'm already using it

image image

@PerchunPak
Copy link
Copy Markdown
Author

You are using nil, which is IMO worse and has less features. Change nix.serverPath to nixd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants