Difference between revisions of "Editor Modes for Nix Files"
From NixOS Wiki
m (Remove trailing whitespace in code blocks) |
|||
Line 13: | Line 13: | ||
<syntaxHighlight lang="nix">{ # /etc/nixos/configuration.nix | <syntaxHighlight lang="nix">{ # /etc/nixos/configuration.nix | ||
environment.systemPackages = [ | environment.systemPackages = [ | ||
− | (pkgs.vim_configurable.customize { | + | (pkgs.vim_configurable.customize { |
− | name = "vim"; | + | name = "vim"; |
vimrcConfig.vam.pluginDictionaries = [ | vimrcConfig.vam.pluginDictionaries = [ | ||
# vim-nix handles indentation better but does not perform sanity | # vim-nix handles indentation better but does not perform sanity | ||
Line 30: | Line 30: | ||
<syntaxHighlight lang="nix">{ # /etc/nixos/configuration.nix | <syntaxHighlight lang="nix">{ # /etc/nixos/configuration.nix | ||
environment.systemPackages = [ | environment.systemPackages = [ | ||
− | (pkgs.vim_configurable.customize { | + | (pkgs.vim_configurable.customize { |
− | name = "vim"; | + | name = "vim"; |
− | vimrcConfig.packages.myplugins = with pkgs.vimPlugins; { | + | vimrcConfig.packages.myplugins = with pkgs.vimPlugins; { |
− | start = [ vim-nix ]; # load plugin on startup | + | start = [ vim-nix ]; # load plugin on startup |
− | }; | + | }; |
}) | }) | ||
]; | ]; |
Revision as of 23:08, 21 October 2017
This is a list of editor modes for Nix syntax.
Emacs
- nix-mode official available in melpa
- @marsam's nix-mode
- nix-buffer
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
- nix-eclipse - development stopped in 2010