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:
@@ -14,6 +14,7 @@
|
|||||||
todo-txt-vim = pkgs.callPackage <niveum/packages/vimPlugins/todo-txt-vim.nix> {};
|
todo-txt-vim = pkgs.callPackage <niveum/packages/vimPlugins/todo-txt-vim.nix> {};
|
||||||
jq-vim = pkgs.callPackage <niveum/packages/vimPlugins/jq-vim.nix> {};
|
jq-vim = pkgs.callPackage <niveum/packages/vimPlugins/jq-vim.nix> {};
|
||||||
vim-fsharp = pkgs.callPackage <niveum/packages/vimPlugins/vim-fsharp.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>;
|
customRC = builtins.readFile <niveum/dot/init.vim>;
|
||||||
packages.nvim = with pkgs.vimPlugins; {
|
packages.nvim = with pkgs.vimPlugins; {
|
||||||
start = [
|
start = [
|
||||||
ale
|
# cheat-sh-vim
|
||||||
# deoplete-nvim
|
# deoplete-nvim
|
||||||
|
# vim-abolish
|
||||||
|
ale
|
||||||
fzf-vim
|
fzf-vim
|
||||||
fzfWrapper
|
fzfWrapper
|
||||||
tabular
|
tabular
|
||||||
# vim-abolish
|
vim-256noir
|
||||||
|
vim-colors-paramount
|
||||||
vim-commentary
|
vim-commentary
|
||||||
vim-eunuch
|
vim-eunuch
|
||||||
|
vim-fetch
|
||||||
vim-fugitive
|
vim-fugitive
|
||||||
vim-gitgutter
|
vim-gitgutter
|
||||||
vim-pandoc vim-pandoc-syntax # vim-pandoc-after
|
vim-pandoc vim-pandoc-syntax # vim-pandoc-after
|
||||||
@@ -38,29 +43,26 @@
|
|||||||
vim-sensible
|
vim-sensible
|
||||||
vim-startify
|
vim-startify
|
||||||
vim-surround
|
vim-surround
|
||||||
# cheat-sh-vim
|
|
||||||
vim-fetch
|
|
||||||
vim-colors-paramount
|
|
||||||
vim-256noir
|
|
||||||
];
|
];
|
||||||
opt = [
|
opt = [
|
||||||
csv
|
csv
|
||||||
dhall-vim
|
dhall-vim
|
||||||
elm-vim
|
elm-vim
|
||||||
|
emmet-vim
|
||||||
haskell-vim
|
haskell-vim
|
||||||
idris-vim
|
idris-vim
|
||||||
rust-vim
|
jq-vim
|
||||||
typescript-vim
|
|
||||||
vim-javascript
|
|
||||||
purescript-vim
|
purescript-vim
|
||||||
|
rust-vim
|
||||||
|
todo-txt-vim
|
||||||
|
typescript-vim
|
||||||
|
vim-fsharp
|
||||||
|
vim-javascript
|
||||||
|
vim-ledger
|
||||||
vim-nix
|
vim-nix
|
||||||
|
vim-reason-plus
|
||||||
vim-toml
|
vim-toml
|
||||||
vimtex
|
vimtex
|
||||||
vim-ledger
|
|
||||||
todo-txt-vim
|
|
||||||
emmet-vim
|
|
||||||
jq-vim
|
|
||||||
vim-fsharp
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
15
dot/init.vim
15
dot/init.vim
@@ -79,25 +79,11 @@ if exists("+undofile")
|
|||||||
set undofile
|
set undofile
|
||||||
endif
|
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>
|
nnoremap <silent> <Space> @=(foldlevel('.')?'za':"\<Space>")<CR>
|
||||||
vnoremap <Space> zf
|
vnoremap <Space> zf
|
||||||
|
|
||||||
command! RandomLine execute 'normal! '.(system('/bin/sh -c "echo -n $RANDOM"') % line('$')).'G'
|
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()
|
function! s:DiffWithSaved()
|
||||||
let filetype=&ft
|
let filetype=&ft
|
||||||
diffthis
|
diffthis
|
||||||
@@ -122,6 +108,7 @@ if has("autocmd")
|
|||||||
autocmd bufnewfile,bufread *.ts packadd typescript-vim | set filetype=typescript
|
autocmd bufnewfile,bufread *.ts packadd typescript-vim | set filetype=typescript
|
||||||
autocmd bufnewfile,bufread *.purs packadd purescript-vim | set filetype=purescript
|
autocmd bufnewfile,bufread *.purs packadd purescript-vim | set filetype=purescript
|
||||||
autocmd bufnewfile,bufread *.jq packadd jq.vim
|
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 *.journal packadd vim-ledger | set filetype=ledger shiftwidth=4
|
||||||
autocmd bufnewfile,bufread config set filetype=conf
|
autocmd bufnewfile,bufread config set filetype=conf
|
||||||
autocmd bufnewfile,bufread *.elm packadd elm-vim | set filetype=elm shiftwidth=4
|
autocmd bufnewfile,bufread *.elm packadd elm-vim | set filetype=elm shiftwidth=4
|
||||||
|
|||||||
10
packages/vimPlugins/vim-reason-plus.nix
Normal file
10
packages/vimPlugins/vim-reason-plus.nix
Normal 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";
|
||||||
|
};
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user