Update vim config
This commit is contained in:
parent
d4b7a4bbbe
commit
a09b413eb2
1 changed files with 61 additions and 61 deletions
|
@ -1,10 +1,37 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
let
|
let
|
||||||
neovim = pkgs.neovim.override {
|
list = builtins.attrValues;
|
||||||
configure = {
|
cocSettings = {
|
||||||
customRC = builtins.readFile ./vimrc;
|
"diagnostic.maxWindowHeight" = 60;
|
||||||
packages.myVimPackage = {
|
"diagnostic.virtualText" = true;
|
||||||
start = builtins.attrValues {
|
"diagnostic.virtualTextCurrentLineOnly" = false;
|
||||||
|
"codeLens.enable" = true;
|
||||||
|
languageserver = {
|
||||||
|
nix = {
|
||||||
|
command = "rnix-lsp";
|
||||||
|
filetypes = [ "nix" ];
|
||||||
|
};
|
||||||
|
haskell = {
|
||||||
|
command = "haskell-language-server";
|
||||||
|
args = [ "--lsp" "-d" "-l" "/tmp/LanguageServer.log" ];
|
||||||
|
rootPatterns = [ ".hie-bios" "cabal.project" ];
|
||||||
|
filetypes = [ "hs" "lhs" "haskell" ];
|
||||||
|
settings.languageServerHaskell.formattingProvider = "fourmolu";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
explorer.icon.enableNerdfont = true;
|
||||||
|
explorer.file.child.template =
|
||||||
|
"[git | 2] [selection | clip | 1] [indent][icon | 1] [diagnosticError & 1][diagnosticWarning & 1][filename omitCenter 1][modified][readonly] [linkIcon & 1][link growRight 1 omitCenter 5][size]";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ ./spelling.nix ];
|
||||||
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
vimAlias = true;
|
||||||
|
vimdiffAlias = true;
|
||||||
|
extraConfig = builtins.readFile ./vimrc;
|
||||||
|
plugins = list {
|
||||||
inherit (pkgs.vimPlugins)
|
inherit (pkgs.vimPlugins)
|
||||||
# coc-tabnine (TODO: Why doesn‘t it work?)
|
# coc-tabnine (TODO: Why doesn‘t it work?)
|
||||||
# TODO: tabnine config in home-manager
|
# TODO: tabnine config in home-manager
|
||||||
|
@ -58,36 +85,9 @@ let
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
cocSettings = {
|
|
||||||
"diagnostic.maxWindowHeight" = 60;
|
|
||||||
"diagnostic.virtualText" = true;
|
|
||||||
"diagnostic.virtualTextCurrentLineOnly" = false;
|
|
||||||
"codeLens.enable" = true;
|
|
||||||
languageserver = {
|
|
||||||
nix = {
|
|
||||||
command = "rnix-lsp";
|
|
||||||
filetypes = [ "nix" ];
|
|
||||||
};
|
|
||||||
haskell = {
|
|
||||||
command = "haskell-language-server";
|
|
||||||
args = [ "--lsp" "-d" "-l" "/tmp/LanguageServer.log" ];
|
|
||||||
rootPatterns = [ ".hie-bios" "cabal.project" ];
|
|
||||||
filetypes = [ "hs" "lhs" "haskell" ];
|
|
||||||
settings.languageServerHaskell.formattingProvider = "fourmolu";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
explorer.icon.enableNerdfont = true;
|
|
||||||
explorer.file.child.template =
|
|
||||||
"[git | 2] [selection | clip | 1] [indent][icon | 1] [diagnosticError & 1][diagnosticWarning & 1][filename omitCenter 1][modified][readonly] [linkIcon & 1][link growRight 1 omitCenter 5][size]";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [ ./spelling.nix ];
|
|
||||||
home = {
|
home = {
|
||||||
file.".config/nvim/coc-settings.json".text = builtins.toJSON cocSettings;
|
file.".config/nvim/coc-settings.json".text = builtins.toJSON cocSettings;
|
||||||
packages = [ neovim pkgs.neuron-language-server ];
|
packages = [ neovim pkgs.neuron-language-server ];
|
||||||
sessionVariables.EDITOR = "${neovim}/bin/nvim";
|
sessionVariables.EDITOR = "nvim";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue