This commit is contained in:
FredzyW 2024-10-30 09:05:24 +01:00
parent 73138e35be
commit fd16d84fe3
6 changed files with 73 additions and 231 deletions

View file

@ -3,7 +3,7 @@ let
dwm = pkgs.dwm.overrideAttrs (old: {
src = builtins.fetchGit {
url = "https://github.com/FredzyW/dwm-conf.git";
rev = "696050185fa48575e53157e83d46ae0613733446";
rev = "c02e50e47966263f2d18a4442570ba6e38d76a4b";
};
nativeBuildInputs = with pkgs; [
xorg.libX11.dev

View file

@ -48,8 +48,7 @@
home="home-manager switch --flake $HM_DIR";
reb="sudo nixos-rebuild switch --flake $SYSTEM_DIR";
cam="jira issue create && jira issue assign && jira issue move";
vpnup="sudo VPN_PROTOCOL=wireguard DISABLE_IPV6=yes DIP_TOKEN=no AUTOCONNECT=true PIA_PF=false PIA_DNS=true PIA_USER=p4558499 PIA_PASS=vUZA6Nfzci ~/program/manual-connections/run_setup.sh";
vpndown="wg-quick down pia";
latest="git log | head -1 | awk '{print $2;}' | xsel -i";
};
interactiveShellInit = ''
set fish_greeting # Disable greeting

View file

@ -3,35 +3,24 @@
programs.vim = {
enable = true;
plugins = with pkgs.vimPlugins; [
ale
vim-nix
vim-lastplace
dracula-vim
vim-sensible
vim-commentary
vim-surround
vim-fugitive
auto-pairs
fzf-vim
YouCompleteMe
asyncomplete-vim
asyncomplete-lsp-vim
ultisnips
vim-snippets
vim-lsp
vim-lsp-snippets
vim-lsp-ultisnips
vim-lsp-settings
asyncomplete-lsp-vim
catppuccin-vim
];
settings = { ignorecase = true; };
extraConfig = ''
nnoremap <Space>f :Files<Cr>
nnoremap <Space>w :w<Cr>
nnoremap <Space>q :q<Cr>
nnoremap <Space>o :RG<Cr>
nnoremap <Tab> :bnext<Cr>
nnoremap <S-Tab> :bprev<Cr>
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <cr> pumvisible() ? asyncomplete#close_popup() : "\<cr>"
set cmdheight=1
set relativenumber
@ -39,44 +28,8 @@
set shiftwidth=4
set tabstop=4
set termguicolors
colorscheme dracula
function! s:on_lsp_buffer_enabled() abort
setlocal omnifunc=lsp#complete
setlocal signcolumn=yes
if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif
nmap <buffer> gd <plug>(lsp-definition)
nmap <buffer> gs <plug>(lsp-document-symbol-search)
nmap <buffer> gS <plug>(lsp-workspace-symbol-search)
nmap <buffer> gr <plug>(lsp-references)
nmap <buffer> gi <plug>(lsp-implementation)
nmap <buffer> gt <plug>(lsp-type-definition)
nmap <buffer> <leader>rn <plug>(lsp-rename)
nmap <buffer> [g <plug>(lsp-previous-diagnostic)
nmap <buffer> ]g <plug>(lsp-next-diagnostic)
nmap <buffer> K <plug>(lsp-hover)
nnoremap <buffer> <expr><c-f> lsp#scroll(+4)
nnoremap <buffer> <expr><c-d> lsp#scroll(-4)
let g:lsp_format_sync_timeout = 1000
autocmd! BufWritePre *.rs,*.go call execute('LspDocumentFormatSync')
" refer to doc to add more commands
endfunction
augroup lsp_install
au!
" call s:on_lsp_buffer_enabled only for languages that has the server registered.
autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
augroup END
if executable('nil')
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'nil',
\ 'cmd': {server_info->['nil']},
\ 'whitelist': ['nix'],
\ })
endif
colorscheme catppuccin_mocha
'';
};
}