diff --git a/users/coyote/dotfiles/vimrc b/users/coyote/dotfiles/vimrc index 89ed4cf..5bc2e24 100644 --- a/users/coyote/dotfiles/vimrc +++ b/users/coyote/dotfiles/vimrc @@ -10,7 +10,7 @@ syntax on set ruler set showcmd set showmode -set laststatus=2 +set laststatus=1 set wildmenu set wildmode=longest,list,full set ttyfast @@ -19,11 +19,11 @@ set lazyredraw filetype plugin indent on set autoindent set smartindent +set expandtab +set smarttab set tabstop=4 set shiftwidth=4 set softtabstop=4 -set expandtab -set smarttab set hlsearch set incsearch @@ -31,16 +31,15 @@ set ignorecase set smartcase set showmatch -let g:indentLine_enabled = 1 -let g:indentLine_char = "╎" -let g:indentLine_setColors = 1 +augroup LispIndent + autocmd! + autocmd FileType lisp,clojure,scheme,racket setlocal lisp autoindent showmatch expandtab tabstop=2 shiftwidth=2 softtabstop=2 + autocmd FileType lisp,clojure,scheme,racket setlocal lispwords+=defmacro,defmethod,define-syntax,let,let*,letrec,cond +augroup END -augroup LanguageIndentSettings +augroup LanguageIndent autocmd! 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 go,make setlocal tabstop=4 shiftwidth=4 noexpandtab - - 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 diff --git a/users/coyote/dotfiles/vimrc-lisp b/users/coyote/dotfiles/vimrc-lisp new file mode 100644 index 0000000..b2038a5 --- /dev/null +++ b/users/coyote/dotfiles/vimrc-lisp @@ -0,0 +1,10 @@ +setlocal expandtab +setlocal tabstop=2 +setlocal shiftwidth=2 +setlocal softtabstop=2 + +setlocal lisp +setlocal autoindent +setlocal showmatch + +setlocal lispwords+=defmacro,defmethod,define-syntax,let,let*,letre,cond diff --git a/users/coyote/home.nix b/users/coyote/home.nix index c1d13f0..f8aa32b 100644 --- a/users/coyote/home.nix +++ b/users/coyote/home.nix @@ -24,6 +24,10 @@ file = { ".vimrc".source = ./dotfiles/vimrc; + ".vim/after/ftplugin/lisp.vim".source = ./dotfiles/vimrc-lisp; + ".vim/after/ftplugin/scheme.vim".source = ./dotfiles/vimrc-lisp; + ".vim/after/ftplugin/clojure.vim".source = ./dotfiles/vimrc-lisp; + ".vim/after/ftplugin/racket.vim".source = ./dotfiles/vimrc-lisp; ".config/fastfetch/config.jsonc".source = ./dotfiles/fastfetch.jsonc; ".config/helix/config.toml".source = ./dotfiles/helix.toml; ".config/helix/languages.toml".source = ./dotfiles/helix-languages.toml; @@ -48,7 +52,6 @@ enable = true; packageConfigurable = pkgs.unstable.vim-full; defaultEditor = true; - plugins = with pkgs.vimPlugins; [indentLine]; }; git = { enable = true;