Editor Modes for Nix Files: Difference between revisions

From NixOS Wiki
imported>Jnoortheen
m added link to my project on vscode extension for Nix
imported>Artturin
add rnix-lsp
Line 6: Line 6:
* [https://github.com/shlevy/nix-buffer nix-buffer]
* [https://github.com/shlevy/nix-buffer nix-buffer]
* [https://github.com/jwiegley/nix-update-el nix-update-el]
* [https://github.com/jwiegley/nix-update-el nix-update-el]
* [https://github.com/nix-community/rnix-lsp rnix-lsp]
== Vim ==
== Vim ==
=== rnix-lsp ===
* [https://github.com/nix-community/rnix-lsp rnix-lsp on github]
instructions are in the readme
=== vim-addon-nix ===
=== vim-addon-nix ===
This plugin supports syntax highlighting and simple syntax and undeclared variable checking.
This plugin supports syntax highlighting and simple syntax and undeclared variable checking.

Revision as of 01:31, 18 November 2020

This is a list of editor modes for Nix syntax.

Emacs

Vim

rnix-lsp

instructions are in the readme

vim-addon-nix

This plugin supports syntax highlighting and simple syntax and undeclared variable checking.

Usage with VAM package manager:

{ # /etc/nixos/configuration.nix
  environment.systemPackages = [
    (pkgs.vim_configurable.customize {
      name = "vim";
      vimrcConfig.vam.pluginDictionaries = [
        # vim-nix handles indentation better but does not perform sanity
        { names = [ "vim-addon-nix" ]; ft_regex = "^nix\$"; }
      ];
    })
  ];
}

vim-nix

vim-nix *only* supports syntax-highighting.

Usage with vim package manager:

{ # /etc/nixos/configuration.nix
  environment.systemPackages = [
    (pkgs.vim_configurable.customize {
      name = "vim";
      vimrcConfig.packages.myplugins = with pkgs.vimPlugins; {
        start = [ vim-nix ]; # load plugin on startup
      };
    })
  ];
}

IntelliJ IDEA

Eclipse

Sublime Text

Atom

Visual Studio Code

Howl

Far2l

nano