add dev editor
This commit is contained in:
parent
71c7e38bdb
commit
8ab49bb051
3 changed files with 47 additions and 0 deletions
31
dev/nvim-ts.nix
Normal file
31
dev/nvim-ts.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
let
|
||||
d2-vim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
name = "d2-vim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "terrastruct";
|
||||
repo = "d2-vim";
|
||||
rev = "ac58c07ba192d215cbbd2b2207f9def808a9283d";
|
||||
hash = "sha256-rXUhXVmva4K0PqUboSXUpTqNttwehjkjjsEgTCZbGKI=";
|
||||
};
|
||||
};
|
||||
|
||||
neovim = pkgs.neovim.override {
|
||||
configure = {
|
||||
customRC = ''
|
||||
source ${./vimrc.vim}
|
||||
'';
|
||||
|
||||
packages.myPlugins.start = with pkgs.vimPlugins; [
|
||||
d2-vim
|
||||
nvim-treesitter
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
pkgs.runCommand "nvim-ts" { } ''
|
||||
mkdir -p $out/bin
|
||||
ln -s ${neovim}/bin/nvim $out/bin/nvim-ts
|
||||
''
|
15
dev/vimrc.vim
Normal file
15
dev/vimrc.vim
Normal file
|
@ -0,0 +1,15 @@
|
|||
" Basic settings for tests
|
||||
set mouse=a
|
||||
set number
|
||||
set cursorline
|
||||
set expandtab
|
||||
set shiftwidth=2
|
||||
set softtabstop=-1
|
||||
set signcolumn=yes
|
||||
set completeopt=menuone,noselect
|
||||
set ttimeoutlen=1
|
||||
set autoindent
|
||||
|
||||
" Always show statusline.
|
||||
set laststatus=2
|
||||
set statusline=%<%f\ %m%r%y\ %LL\ %=\ 0x%-4.B\ %-16.(%lL,%cC%V,%oB%)\ %P
|
|
@ -18,6 +18,7 @@
|
|||
nodePackages.eslint
|
||||
nodePackages.prettier
|
||||
nodePackages.vscode-langservers-extracted # html, css, json, eslint
|
||||
(import ./dev/nvim-ts.nix { inherit pkgs; })
|
||||
];
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue