1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

feat(vim): add reason support

This commit is contained in:
Kierán Meinhardt
2020-03-01 12:54:53 +01:00
parent bc85925037
commit 457b995f1c
3 changed files with 27 additions and 28 deletions

View File

@@ -14,6 +14,7 @@
todo-txt-vim = pkgs.callPackage <niveum/packages/vimPlugins/todo-txt-vim.nix> {};
jq-vim = pkgs.callPackage <niveum/packages/vimPlugins/jq-vim.nix> {};
vim-fsharp = pkgs.callPackage <niveum/packages/vimPlugins/vim-fsharp.nix> {};
vim-reason-plus = pkgs.callPackage <niveum/packages/vimPlugins/vim-reason-plus.nix> {};
};
};
@@ -23,14 +24,18 @@
customRC = builtins.readFile <niveum/dot/init.vim>;
packages.nvim = with pkgs.vimPlugins; {
start = [
ale
# cheat-sh-vim
# deoplete-nvim
# vim-abolish
ale
fzf-vim
fzfWrapper
tabular
# vim-abolish
vim-256noir
vim-colors-paramount
vim-commentary
vim-eunuch
vim-fetch
vim-fugitive
vim-gitgutter
vim-pandoc vim-pandoc-syntax # vim-pandoc-after
@@ -38,29 +43,26 @@
vim-sensible
vim-startify
vim-surround
# cheat-sh-vim
vim-fetch
vim-colors-paramount
vim-256noir
];
opt = [
csv
dhall-vim
elm-vim
emmet-vim
haskell-vim
idris-vim
rust-vim
typescript-vim
vim-javascript
jq-vim
purescript-vim
rust-vim
todo-txt-vim
typescript-vim
vim-fsharp
vim-javascript
vim-ledger
vim-nix
vim-reason-plus
vim-toml
vimtex
vim-ledger
todo-txt-vim
emmet-vim
jq-vim
vim-fsharp
];
};
};

View File

@@ -79,25 +79,11 @@ if exists("+undofile")
set undofile
endif
" nnoremap <C-j> ddp | vnoremap <C-j> xp`[V`]
" nnoremap <C-k> ddkP | vnoremap <C-k> xkP`[V`]
nnoremap <silent> <Space> @=(foldlevel('.')?'za':"\<Space>")<CR>
vnoremap <Space> zf
command! RandomLine execute 'normal! '.(system('/bin/sh -c "echo -n $RANDOM"') % line('$')).'G'
" function! <SID>StripTrailingWhitespaces()
" let _s=@/
" let l=line(".")
" let c=col(".")
" %s/\s\+$//e
" let @/=_s
" call cursor(l,c)
" endfunction
function! s:DiffWithSaved()
let filetype=&ft
diffthis
@@ -122,6 +108,7 @@ if has("autocmd")
autocmd bufnewfile,bufread *.ts packadd typescript-vim | set filetype=typescript
autocmd bufnewfile,bufread *.purs packadd purescript-vim | set filetype=purescript
autocmd bufnewfile,bufread *.jq packadd jq.vim
autocmd bufnewfile,bufread *.re packadd vim-reason-plus | set filetype=reason
autocmd bufnewfile,bufread *.journal packadd vim-ledger | set filetype=ledger shiftwidth=4
autocmd bufnewfile,bufread config set filetype=conf
autocmd bufnewfile,bufread *.elm packadd elm-vim | set filetype=elm shiftwidth=4

View File

@@ -0,0 +1,10 @@
{ vimUtils, fetchFromGitHub }:
(vimUtils.buildVimPluginFrom2Nix {
name = "vim-reason-plus";
src = fetchFromGitHub {
owner = "reasonml-editor";
repo = "vim-reason-plus";
rev = "c11a2940f8f3e3915e472c366fe460b0fe008bac";
sha256 = "1vx7cwxzj6f12qcwcwa040adqk9cyzjd9f3ix26hnw2dw6r9cdr4";
};
})