was tweaking vim 9 but why

master
Jordan Orelli 4 months ago
parent 0ce817f832
commit c3fa15a310

@ -17,8 +17,8 @@ setopt prompt_subst
zstyle ':vcs_info:git:*' formats '%b' zstyle ':vcs_info:git:*' formats '%b'
# prompt configs # prompt configs
RPROMPT='${vcs_info_msg_0_}' # RPROMPT='${vcs_info_msg_0_}'
PROMPT='%F{green}%n@%m %~ ▷%f ' PROMPT='%F{#99ad6a}%~ %(1j.%F{#adadad}[%j]%f .)%F{#99ad6a}▷%f '
# history stuff # history stuff
export HISTFILE=~/.zsh_history export HISTFILE=~/.zsh_history

@ -27,7 +27,7 @@ repo: https://github.com/yegappan/lsp
target: ~/.vim/pack/downloads/opt/lsp target: ~/.vim/pack/downloads/opt/lsp
[home vim] [home vim]
when: host.has('vim') or host.has('nvim') when: host.has('vim')
files: files:
vim/ftplugin > .vim/ftplugin vim/ftplugin > .vim/ftplugin
vim/plug.vim > .vim/autoload/plug.vim vim/plug.vim > .vim/autoload/plug.vim
@ -65,30 +65,30 @@ files:
when: host.has('vim') when: host.has('vim')
cmd: vim +PlugInstall +qall cmd: vim +PlugInstall +qall
[link-files neovim:windows] # [link-files neovim:windows]
when: host.is_windows and host.has('nvim') # when: host.is_windows and host.has('nvim')
target_root: ~/AppData/Local # target_root: ~/AppData/Local
files: # files:
nvim/lua # nvim/lua
nvim/init.vim # nvim/init.vim
[link-files neovim:linux] # [link-files neovim:linux]
when: host.is_linux and host.has('nvim') # when: host.is_linux and host.has('nvim')
target_root: ~/.config # target_root: ~/.config
files: # files:
nvim/colors # nvim/colors
nvim/lua # nvim/lua
nvim/init.vim # nvim/init.vim
[git packer-posix] # [git packer-posix]
when: not host.is_windows # when: not host.is_windows
repo: https://github.com/wbthomason/packer.nvim # repo: https://github.com/wbthomason/packer.nvim
target: ~/.local/share/nvim/site/pack/packer/start/packer.nvim # target: ~/.local/share/nvim/site/pack/packer/start/packer.nvim
[git packer-windows] # [git packer-windows]
when: host.is_windows # when: host.is_windows
repo: https://github.com/wbthomason/packer.nvim # repo: https://github.com/wbthomason/packer.nvim
target: ~/AppData/Local/nvim-data/site/pack/packer/start/packer.nvim # target: ~/AppData/Local/nvim-data/site/pack/packer/start/packer.nvim
[home cargo] [home cargo]
when: host.has('cargo') when: host.has('cargo')
@ -115,9 +115,9 @@ files: .screenrc
when: host.has('tmux') when: host.has('tmux')
files: .tmux.conf files: .tmux.conf
[home posix-nvim] # [home posix-nvim]
when: host.has('nvim') and not host.is_windows # when: host.has('nvim') and not host.is_windows
files: nvim/init.vim > .config/nvim/init.vim # files: nvim/init.vim > .config/nvim/init.vim
[home wsl] [home wsl]
when: host.is_wsl when: host.is_wsl
@ -137,10 +137,12 @@ files: k9s/skin.yml > .config/k9s/skin.yml
crates: crates:
just just
cargo-watch cargo-watch
# this one isn't working on MacOS
# cargo-edit
cargo-get cargo-get
# this one requires libssl but we don't install that here so it doesn't
# always work
# cargo-edit
[link-files gitui:linux] [link-files gitui:linux]
when: host.is_linux and host.has('gitui') when: host.is_linux and host.has('gitui')
target_root: ~/.config target_root: ~/.config

@ -1422,7 +1422,7 @@ tab_bar_min_tabs 2
#: in the path are expanded. Changing this option by reloading the #: in the path are expanded. Changing this option by reloading the
#: config is not supported. #: config is not supported.
# clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask
#: Allow programs running in kitty to read and write from the #: Allow programs running in kitty to read and write from the
#: clipboard. You can control exactly which actions are allowed. The #: clipboard. You can control exactly which actions are allowed. The

@ -1,4 +1,5 @@
set expandtab set expandtab
set shiftwidth=2 set shiftwidth=2
set tabstop=2 set tabstop=2
let b:ale_fix_on_save = 1
" set omnifunc=ale#completion#OmniFunc " set omnifunc=ale#completion#OmniFunc

@ -1,4 +1,6 @@
let g:rustfmt_autosave = 1 let b:rustfmt_autosave = 1
let b:ale_rust_cargo_use_clippy = 1
let b:ale_fix_on_save = 1
nmap <F5> :Cargo run<CR> nmap <F5> :Cargo run<CR>
nmap <F7> :Cargo check<CR> nmap <F7> :Cargo check<CR>

18
vimrc

@ -10,6 +10,9 @@ if has('nvim') && has('win32')
endif endif
call plug#begin() call plug#begin()
if !has('nvim')
Plug 'dense-analysis/ale' " just for linting this time around
endif
Plug 'tpope/vim-fugitive' " integration with the git cli Plug 'tpope/vim-fugitive' " integration with the git cli
Plug 'tpope/vim-surround' " edits surrounding quotes and parens and the like Plug 'tpope/vim-surround' " edits surrounding quotes and parens and the like
Plug 'tpope/vim-rails' " rails project management stuff Plug 'tpope/vim-rails' " rails project management stuff
@ -22,6 +25,7 @@ call plug#begin()
Plug 'fatih/vim-hclfmt' " nicely formats hcl files Plug 'fatih/vim-hclfmt' " nicely formats hcl files
Plug 'nanotech/jellybeans.vim' " the best colorscheme Plug 'nanotech/jellybeans.vim' " the best colorscheme
Plug 'ervandew/supertab' " makes tab better apparently Plug 'ervandew/supertab' " makes tab better apparently
Plug 'NoahTheDuke/vim-just' " justfiles
Plug 'scrooloose/nerdcommenter' " no idea if I'm even using this Plug 'scrooloose/nerdcommenter' " no idea if I'm even using this
Plug 'ctrlpvim/ctrlp.vim' " don't actually know how to use this honestly Plug 'ctrlpvim/ctrlp.vim' " don't actually know how to use this honestly
Plug 'itchyny/lightline.vim' " fancy status line Plug 'itchyny/lightline.vim' " fancy status line
@ -533,10 +537,16 @@ nmap <S-M> :LspDiagCurrent<CR>
" ALE -----------------------------------------------------------------------{{{ " ALE -----------------------------------------------------------------------{{{
if !has('nvim') if !has('nvim')
let g:ale_linters = {'rust': ['analyzer']} let g:ale_linters = {
let g:ale_fixers = {'rust': ['rustfmt', 'trim_whitespace', 'remove_trailing_lines']} \ 'rust': ['analyzer'],
let g:ale_rust_cargo_use_clippy = 1 \ 'python': ['ruff']
let g:ale_completion_enabled = 1 \ }
let g:ale_fixers = {
\ 'rust': ['rustfmt', 'trim_whitespace', 'remove_trailing_lines'],
\ 'python': ['ruff_format', 'reorder-python-imports']
\ }
" we're not using ALE for Autocomplete because we're using lsp instead
let g:ale_completion_enabled = 0
set completeopt=menu,menuone,preview,noselect,noinsert set completeopt=menu,menuone,preview,noselect,noinsert
endif endif
" ---------------------------------------------------------------------------}}} " ---------------------------------------------------------------------------}}}

Loading…
Cancel
Save