Skip to content

Commit

Permalink
Drop spacevim for plain neovim
Browse files Browse the repository at this point in the history
  • Loading branch information
rake5k committed Sep 13, 2023
1 parent fa16ec5 commit 2d8072f
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 197 deletions.
26 changes: 1 addition & 25 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,6 @@
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};

spacevim = {
url = "github:rake5k/spacevim-flake";
inputs = {
nixpkgs.follows = "nixpkgs-unstable";
pre-commit-hooks.follows = "pre-commit-hooks";
};
};
};

outputs = { self, nixpkgs, ... } @ inputs:
Expand Down
Empty file.
19 changes: 0 additions & 19 deletions home/users/christian/vim/bootstrap_before.vim

This file was deleted.

102 changes: 0 additions & 102 deletions home/users/christian/vim/config.nix

This file was deleted.

81 changes: 46 additions & 35 deletions home/users/christian/vim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,22 @@ let

cfg = config.custom.users.christian.vim;

spacevim = pkgs.custom.spacevim.override {
spacevim_config = import ./config.nix;
bootstrap_before = builtins.readFile ./bootstrap_before.vim;
bootstrap_after = builtins.readFile ./bootstrap_after.vim;
};

nvim-spell-de-utf8-dictionary = builtins.fetchurl {
url = "http://ftp.vim.org/vim/runtime/spell/de.utf-8.spl";
sha256 = "sha256:73c7107ea339856cdbe921deb92a45939c4de6eb9c07261da1b9dd19f683a3d1";
};
nvim-spell-de-utf8-suggestions = builtins.fetchurl {
url = "http://ftp.vim.org/vim/runtime/spell/de.utf-8.sug";
sha256 = "sha256:0j592ibsias7prm1r3dsz7la04ss5bmsba6l1kv9xn3353wyrl0k";
};
nvim-spell-en-utf8-dictionary = builtins.fetchurl {
url = "http://ftp.vim.org/vim/runtime/spell/en.utf-8.spl";
sha256 = "sha256:0w1h9lw2c52is553r8yh5qzyc9dbbraa57w9q0r9v8xn974vvjpy";
};
nvim-spell-en-utf8-suggestions = builtins.fetchurl {
url = "http://ftp.vim.org/vim/runtime/spell/en.utf-8.sug";
sha256 = "sha256:1v1jr4rsjaxaq8bmvi92c93p4b14x2y1z95zl7bjybaqcmhmwvjv";
};

in

Expand All @@ -32,11 +34,6 @@ in

config = mkIf cfg.enable {
home = {
activation.clearSpaceVimConfigCache = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
$DRY_RUN_CMD rm -f $VERBOSE_ARG \
${config.xdg.cacheHome}/SpaceVim/conf/init.json
'';

file =
let
inherit (config.lib.file) mkOutOfStoreSymlink;
Expand All @@ -48,43 +45,57 @@ in
in
{
"${spellConfDir}/de.utf-8.spl".source = nvim-spell-de-utf8-dictionary;
"${spellConfDir}/de.utf-8.sug".source = nvim-spell-de-utf8-suggestions;
"${spellConfDir}/en.utf-8.spl".source = nvim-spell-en-utf8-dictionary;
"${spellConfDir}/en.utf-8.sug".source = nvim-spell-en-utf8-suggestions;
"${spellDataDir}/shared.utf-8.add".source = mkOutOfStoreSymlink "${nixcfgDictionaryDir}/shared.utf-8.add";
"${spellDataDir}/de.utf-8.add".source = mkOutOfStoreSymlink "${nixcfgDictionaryDir}/de.utf-8.add";
"${spellDataDir}/en.utf-8.add".source = mkOutOfStoreSymlink "${nixcfgDictionaryDir}/en.utf-8.add";
};

packages = with pkgs; [
spacevim

# LSP servers
elmPackages.elm-language-server
haskell-language-server
jdt-language-server
nodePackages.bash-language-server
nodePackages.dockerfile-language-server-nodejs
nodePackages.typescript-language-server
nodePackages.vscode-langservers-extracted
nodePackages.vue-language-server
nodePackages.yaml-language-server
python310Packages.python-lsp-server
rnix-lsp
rust-analyzer
];

sessionVariables = {
EDITOR = "spacevim";
};

shellAliases = {
vi = "spacevim";
vim = "spacevim";
EDITOR = "vim";
};
};

xdg.dataFile = {
"nvim/site/dict/mthesaur.txt".source = ./data/dict/mthesaur.txt;
"nvim/site/dict/openthesaurus.txt".source = ./data/dict/openthesaurus.txt;
};

programs.neovim = {
enable = true;
extraConfig = ''
set clipboard=unnamedplus
set number relativenumber
"
" SPELL CHECK
"
filetype plugin on
set spellfile=~/.local/share/nvim/site/spell/shared.utf-8.add,~/.local/share/nvim/site/spell/de.utf-8.add,~/.local/share/nvim/site/spell/en.utf-8.add
autocmd FileType gitcommit setlocal spell spelllang=en_gb
autocmd FileType text setlocal spell spelllang=de_ch,en_gb
"
" THESAURI
"
set thesaurus+=~/.local/share/nvim/site/dict/openthesaurus.txt
set thesaurus+=~/.local/share/nvim/site/dict/mthesaur.txt
'';
plugins = with pkgs.vimPlugins; [
vim-nix

# Markdown
tabular
vim-markdown
];
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
};
};
}
9 changes: 1 addition & 8 deletions lib/nixpkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,10 @@ import inputs.nixpkgs {
unstable = import inputs.nixpkgs-unstable {
inherit config system;
};

custom = import inputs.nixpkgs {
inherit system;
overlays = [
inputs.spacevim.overlays.default
];
};
in
[
(final: prev: {
inherit system unstable custom;
inherit system unstable;

inherit (inputs.agenix-cli.packages."${system}") agenix-cli;
})
Expand Down

0 comments on commit 2d8072f

Please sign in to comment.