Update config. Adapt to M2 Mac Mini

This commit is contained in:
Jan Eitzinger 2023-04-30 09:58:35 +02:00
parent 3dada613bf
commit 3494bdd05f
5 changed files with 26 additions and 8 deletions

View File

@ -74,6 +74,13 @@ vim.lsp.handlers["workspace/diagnostic/refresh"] = function(_, _, ctx)
return true return true
end end
vim.api.nvim_create_autocmd('BufWritePre', {
pattern = '*.go',
callback = function()
vim.lsp.buf.code_action({ context = { only = { 'source.organizeImports' } }, apply = true })
end
})
require("lsp-format").setup {} require("lsp-format").setup {}
{{- if ne .chezmoi.os "openbsd" }} {{- if ne .chezmoi.os "openbsd" }}
@ -131,7 +138,21 @@ require('mason-lspconfig').setup_handlers({
} }
} }
}) })
end end,
['gopls'] = function()
lsp.gopls.setup({
settings = {
gopls = {
analyses = {
unusedparams = true,
unusedvariable = true,
shadow = true
},
staticcheck = true,
},
}
})
end,
}) })
{{- else }} {{- else }}
local on_attach = function(client) local on_attach = function(client)

View File

@ -110,7 +110,6 @@ require('toggleterm').setup({
}) })
require("gruvbox").setup { require("gruvbox").setup {
italic = false,
contrast = "hard" contrast = "hard"
} }

View File

@ -47,7 +47,8 @@ set -g display-time 4000
set -g status-interval 5 set -g status-interval 5
# upgrade $TERM # upgrade $TERM
set -g default-terminal "{{ .term }}" set -g default-terminal "screen-256color"
set-option -sa terminal-features ',{{ .term }}:RGB'
# emacs key bindings in tmux command prompt (prefix + :) are better than # emacs key bindings in tmux command prompt (prefix + :) are better than
# vi keys, even for vim users # vi keys, even for vim users

View File

@ -9,8 +9,6 @@ let maplocalleader = "\\"
map <Space> <Leader> map <Space> <Leader>
let g:elite_mode=1 let g:elite_mode=1
source ~/.vim/local.vim
" Plugins {{ "{{{" }} " Plugins {{ "{{{" }}
call plug#begin('~/.vim/plugged') call plug#begin('~/.vim/plugged')
"########### "###########
@ -400,7 +398,6 @@ set thesaurus=~/.vim/thesaurus/english.txt
set spellfile=~/.vim/spell/en.utf8.add set spellfile=~/.vim/spell/en.utf8.add
set spelllang=en_us set spelllang=en_us
set diffopt+=algorithm:patience
set diffopt+=vertical set diffopt+=vertical
" hi SpellBad gui=underline guifg=red cterm=underline ctermfg=red " hi SpellBad gui=underline guifg=red cterm=underline ctermfg=red
"{{ "}}}" }} "{{ "}}}" }}

View File

@ -73,8 +73,8 @@ alias bkp-etc='doas restic -r /mnt/nfs/BSD/restic-repo --verbose backup /etc'
alias bkp-list='doas restic -r /mnt/nfs/BSD/restic-repo snapshots' alias bkp-list='doas restic -r /mnt/nfs/BSD/restic-repo snapshots'
{{- else }} {{- else }}
source $HOME/perl5/perlbrew/etc/bashrc source $HOME/perl5/perlbrew/etc/bashrc
export PATH=$HOME/local/bin:$GOPATH/bin:$HOME/.cargo/bin:$HOME/.symfony/bin:$PATH export PATH=$HOME/local/bin:$GOPATH/bin:$PATH
{{- if eq .chezmoi.hostname "rohan" }} {{- if eq .chezmoi.arch "arm64" }}
export PATH=/opt/homebrew/bin:$PATH export PATH=/opt/homebrew/bin:$PATH
{{- else }} {{- else }}
export PATH=/usr/local/opt/sqlite/bin:/usr/local/opt/ruby/bin:/usr/local/opt/mariadb@10.4/bin:$PATH export PATH=/usr/local/opt/sqlite/bin:/usr/local/opt/ruby/bin:/usr/local/opt/mariadb@10.4/bin:$PATH