fixing vimrc
This commit is contained in:
parent
fd7d861211
commit
9b4f03767e
2 changed files with 5 additions and 24 deletions
|
|
@ -1,4 +1,3 @@
|
||||||
" Vim configuration
|
|
||||||
set nocompatible
|
set nocompatible
|
||||||
set encoding=utf-8
|
set encoding=utf-8
|
||||||
set backspace=indent,eol,start
|
set backspace=indent,eol,start
|
||||||
|
|
@ -24,6 +23,7 @@ set tabstop=4
|
||||||
set shiftwidth=4
|
set shiftwidth=4
|
||||||
set softtabstop=4
|
set softtabstop=4
|
||||||
set expandtab
|
set expandtab
|
||||||
|
set smarttab
|
||||||
|
|
||||||
set hlsearch
|
set hlsearch
|
||||||
set incsearch
|
set incsearch
|
||||||
|
|
@ -31,7 +31,6 @@ set ignorecase
|
||||||
set smartcase
|
set smartcase
|
||||||
set showmatch
|
set showmatch
|
||||||
|
|
||||||
" indent guides
|
|
||||||
let g:indentLine_enabled = 1
|
let g:indentLine_enabled = 1
|
||||||
let g:indentLine_char = "╎"
|
let g:indentLine_char = "╎"
|
||||||
let g:indentLine_setColors = 1
|
let g:indentLine_setColors = 1
|
||||||
|
|
@ -41,17 +40,7 @@ augroup LanguageIndentSettings
|
||||||
autocmd FileType javascript,typescript,html,css,json,nix setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab
|
autocmd FileType javascript,typescript,html,css,json,nix setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab
|
||||||
autocmd FileType python,rust setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab
|
autocmd FileType python,rust setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab
|
||||||
autocmd FileType go,make setlocal tabstop=4 shiftwidth=4 noexpandtab
|
autocmd FileType go,make setlocal tabstop=4 shiftwidth=4 noexpandtab
|
||||||
autocmd FileType lisp,clojure,scheme,racket setlocal lisp autoindent showmatch lispwords+=defmacro,defmethod tabstop=2 shiftwidth=2 softtabstop=2 expandtab
|
|
||||||
|
autocmd FileType lisp,clojure,scheme,racket setlocal lisp nosmartindent showmatch tabstop=2 shiftwidth=2 softtabstop=2 expandtab
|
||||||
|
autocmd FileType lisp,clojure,scheme,racket setlocal lispwords+=defmacro,defmethod
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
" coc.nvim config
|
|
||||||
inoremap <silent><expr> <TAB>
|
|
||||||
\ coc#pum#visible() ? coc#pum#next(1) :
|
|
||||||
\ CheckBackspace() ? "\<Tab>" :
|
|
||||||
\ coc#refresh()
|
|
||||||
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
|
|
||||||
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm() : "\<CR>"
|
|
||||||
function! CheckBackspace() abort
|
|
||||||
let col = col('.') - 1
|
|
||||||
return !col || getline('.')[col - 1] =~# '\s'
|
|
||||||
endfunction
|
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,6 @@
|
||||||
".config/fastfetch/config.jsonc".source = ./dotfiles/fastfetch.jsonc;
|
".config/fastfetch/config.jsonc".source = ./dotfiles/fastfetch.jsonc;
|
||||||
".config/helix/config.toml".source = ./dotfiles/helix.toml;
|
".config/helix/config.toml".source = ./dotfiles/helix.toml;
|
||||||
".config/helix/languages.toml".source = ./dotfiles/helix-languages.toml;
|
".config/helix/languages.toml".source = ./dotfiles/helix-languages.toml;
|
||||||
".vim/coc-settings.json".text = builtins.toJSON {
|
|
||||||
"suggest.noselect" = true;
|
|
||||||
"diagnostic.virtualText" = true;
|
|
||||||
"coc.preferences.formatOnSaveFiletypes" = [ "nix" "json" "javascript" "python" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -53,10 +48,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
packageConfigurable = pkgs.unstable.vim-full;
|
packageConfigurable = pkgs.unstable.vim-full;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins; [indentLine];
|
||||||
indentLine coc-nvim
|
|
||||||
coc-html coc-css coc-json coc-pyright coc-java
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
git = {
|
git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
Reference in a new issue