Difference between revisions of "Editor Modes for Nix Files"

From NixOS Wiki
Jump to: navigation, search
m (added link to my project on vscode extension for Nix)
Line 50: Line 50:
 
== Visual Studio Code ==
 
== Visual Studio Code ==
 
* [https://github.com/bbenoist/vscode-nix vscode-nix on github]
 
* [https://github.com/bbenoist/vscode-nix vscode-nix on github]
 +
* [https://github.com/jnoortheen/vscode-nix-ide vscode-nix-ide on GitHub and VSCode Store] with support to format and lint
 
== Howl ==
 
== Howl ==
 
* [https://github.com/rokf/howl-nix howl-nix on github]
 
* [https://github.com/rokf/howl-nix howl-nix on github]

Revision as of 06:19, 24 August 2020

This is a list of editor modes for Nix syntax.

Emacs

Vim

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