6 Commits

Author SHA1 Message Date
Marcel Schneider f2f5a7c389
fix missing folder during installation 3 years ago
Marcel Schneider e42f37e20c
add standup alias 3 years ago
Marcel Schneider 2d582391be
simplify js vim settings 3 years ago
Marcel Schneider 127dbf7555
disable bell in kitty 3 years ago
Marcel Schneider 35b1ef4941
Use telescope 3 years ago
Marcel Schneider 17f0004127
update compton settings 3 years ago
  1. 3
      awesome/autorun.sh
  2. 73
      init.vim
  3. 1
      install.sh
  4. 1
      kitty/kitty.conf
  5. 39
      vim/ftplugin/javascript.vim
  6. 6
      zsh/aliases.zsh

3
awesome/autorun.sh

@ -11,5 +11,6 @@ run keepass
setxkbmap -option caps:swapescape -layout us -variant altgr-intl setxkbmap -option caps:swapescape -layout us -variant altgr-intl
run pulseaudio --start run pulseaudio --start
run ~/.dotfiles/change-wallpaper.sh run ~/.dotfiles/change-wallpaper.sh
run compton
#run compton
#run /usr/bin/compton --backend glx --paint-on-overlay --vsync opengl-mswc --glx-no-stencil --glx-swap-method 2 --unredir-if-possible --glx-use-gpushader4 #run /usr/bin/compton --backend glx --paint-on-overlay --vsync opengl-mswc --glx-no-stencil --glx-swap-method 2 --unredir-if-possible --glx-use-gpushader4
compton --backend glx --paint-on-overlay --vsync opengl-swc

73
init.vim

@ -34,11 +34,13 @@ Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} " We recommend upda
Plug 'nvim-treesitter/nvim-treesitter-textobjects' Plug 'nvim-treesitter/nvim-treesitter-textobjects'
Plug 'kyazdani42/nvim-web-devicons' " Icons... Plug 'kyazdani42/nvim-web-devicons' " Icons...
Plug 'mfussenegger/nvim-dap', { 'for': ['typescript', 'javascript', 'python', 'rust'] } Plug 'mfussenegger/nvim-dap', { 'for': ['typescript', 'javascript', 'python', 'rust'] }
Plug 'lbrayner/vim-rzip' " recursive zip support, needed for yarn pnp
" telescope. Needed for octo.nvim, might replace fzf " telescope. Needed for octo.nvim, might replace fzf
Plug 'nvim-lua/popup.nvim' Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim' Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim' Plug 'nvim-telescope/telescope.nvim'
Plug 'nvim-telescope/telescope-fzf-native.nvim', { 'do': 'make' } " improve sort performance
Plug 'pwntester/octo.nvim' Plug 'pwntester/octo.nvim'
" {{{ CocPlugins " {{{ CocPlugins
@ -135,6 +137,7 @@ set number " line numbers
set autoread " reload file automatically set autoread " reload file automatically
set colorcolumn=100 " highlight column 99 set colorcolumn=100 " highlight column 99
set textwidth=99 set textwidth=99
set smartcase "use smart case like in ripgrep (case insensitive until capital letters are used)
set history=1000 set history=1000
set wildignore+=node_modules " ignore node_modules folder from file search set wildignore+=node_modules " ignore node_modules folder from file search
@ -189,8 +192,12 @@ au BufReadPost *.mips set syntax=mips
let g:tex_flavor = "latex" let g:tex_flavor = "latex"
" use python 3 when in doubt " use python 3 when in doubt
let g:python3_host_prog="/home/schneider/.pyenv/versions/neovim3/bin/python"
set pyxversion=3 set pyxversion=3
" nodejs settings
"let g:node_host_prog="/usr/bin/node"
" Disable ALEs LSP, as we're using coc " Disable ALEs LSP, as we're using coc
let g:ale_disable_lsp = 1 let g:ale_disable_lsp = 1
" }}} " }}}
@ -201,10 +208,17 @@ let mapleader = ","
nnoremap <leader><C-p> :CtrlPTag<cr> nnoremap <leader><C-p> :CtrlPTag<cr>
" fzf bindings " fzf bindings
nmap <C-p> :Files<CR>
"nmap <C-p> :Files<CR>
nmap <leader><C-p> :Tags<CR> nmap <leader><C-p> :Tags<CR>
nmap <leader>/ :Rg<CR> nmap <leader>/ :Rg<CR>
nmap <leader>b :Buffers<CR>
"nmap <leader>b :Buffers<CR>
" Telescope Bindings
nmap <C-p> :lua require("telescope.builtin").find_files({find_command={"fd","--type=f","-H", "-E=.git", "-E=.yalc", "-E=node_modules"}})<CR>
"nmap <C-p> :Telescope fd<CR>
nmap <leader>b :lua require('telescope.builtin').buffers({ sort_mru = true, ignore_current_buffer = true })<CR>
nmap <leader>/ :Telescope live_grep<CR>
" Toggle NERDTree " Toggle NERDTree
nmap <silent> <leader>k :NERDTreeToggle<cr> nmap <silent> <leader>k :NERDTreeToggle<cr>
@ -228,6 +242,37 @@ nnoremap <F3> :Git<cr>
nnoremap <F4> :Git push<cr> nnoremap <F4> :Git push<cr>
"}}} "}}}
" {{{ Textobjects
lua <<EOF
require'nvim-treesitter.configs'.setup {
textobjects = {
select = {
enable = true,
-- Automatically jump forward to textobj, similar to targets.vim
lookahead = true,
keymaps = {
-- You can use the capture groups defined in textobjects.scm
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
-- Or you can define your own textobjects like this
["iF"] = {
python = "(function_definition) @function",
cpp = "(function_definition) @function",
c = "(function_definition) @function",
java = "(method_declaration) @function",
},
},
},
},
}
EOF
" }}}
" P L U G I N S{{{ " P L U G I N S{{{
let g:languagetool_server="/opt/LanguageTool/LanguageTool-5.0/languagetool-server.jar" let g:languagetool_server="/opt/LanguageTool/LanguageTool-5.0/languagetool-server.jar"
let g:languagetool_jar="/opt/LanguageTool/LanguageTool-5.0/languagetool-commandline.jar" let g:languagetool_jar="/opt/LanguageTool/LanguageTool-5.0/languagetool-commandline.jar"
@ -246,7 +291,7 @@ let g:nv_default_extension = '.md'
let g:nv_main_directory = '~/notes' let g:nv_main_directory = '~/notes'
" Octo.nvim " Octo.nvim
lua require('octo')
"lua require('octo')
" ALE {{{ " ALE {{{
let g:airline#extensions#ale#enabled = 1 let g:airline#extensions#ale#enabled = 1
@ -427,4 +472,26 @@ require'nvim-treesitter.configs'.setup {
EOF EOF
" }}} " }}}
" Telescope {{{
lua <<EOF
-- You dont need to set any of these options. These are the default ones. Only
-- the loading is important
require('telescope').setup {
extensions = {
fzf = {
fuzzy = true, -- false will only do exact matching
override_generic_sorter = true, -- override the generic sorter
override_file_sorter = true, -- override the file sorter
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
-- the default case_mode is "smart_case"
}
}
}
-- To get fzf loaded and working with telescope, you need to call
-- load_extension, somewhere after setup function:
require('telescope').load_extension('fzf')
EOF
"}}}
"}}} "}}}

1
install.sh

@ -25,6 +25,7 @@ done
# Vim folders # Vim folders
echo -e "\eLinking vim files and folders" echo -e "\eLinking vim files and folders"
mkdir "$HOME/.config/nvim"
ln "$DOTFILES/init.vim" "$HOME/.config/nvim" ln "$DOTFILES/init.vim" "$HOME/.config/nvim"
linkables=$( find vim -mindepth 1 -type d -exec basename {} \; ) linkables=$( find vim -mindepth 1 -type d -exec basename {} \; )
mkdir ~/.config/nvim mkdir ~/.config/nvim

1
kitty/kitty.conf

@ -32,3 +32,4 @@ font_size 12.0
bold_font auto bold_font auto
italic_font Source Code Pro Italic italic_font Source Code Pro Italic
bold_italic_font Source Code Pro Bold bold_italic_font Source Code Pro Bold
enable_audio_bell no

39
vim/ftplugin/javascript.vim

@ -1,14 +1,15 @@
let b:ale_fixers = {} let b:ale_fixers = {}
let b:ale_fixers['javascript'] = ['eslint']
let b:ale_fixers['typescript'] = ['eslint']
let b:ale_fixers['javascript'] = ['prettier']
let b:ale_fixers['typescript'] = ['prettier']
let b:ale_fixers['json'] = ['eslint'] let b:ale_fixers['json'] = ['eslint']
let b:ale_javascript_prettier_options = '--no-semi --single-quote --tab-width 2'
let b:ale_typescript_prettier_options = '--no-semi --single-quote --tab-width 2'
"let b:ale_javascript_prettier_options = '--no-semi --single-quote --tab-width 2'
"let b:ale_typescript_prettier_options = '--no-semi --single-quote --tab-width 2'
let b:ale_fixers['vue'] = ['prettier'] let b:ale_fixers['vue'] = ['prettier']
let b:ale_vue_prettier_options = '--no-semi --single-quote' let b:ale_vue_prettier_options = '--no-semi --single-quote'
let b:ale_fix_on_save = 1 let b:ale_fix_on_save = 1
let b:ale_javascript_prettier_use_local_config = 1 let b:ale_javascript_prettier_use_local_config = 1
let b:ale_typescript_prettier_use_local_config = 1 let b:ale_typescript_prettier_use_local_config = 1
let b:ale_fix_on_save = 0
" config for local eslint " config for local eslint
g:ale_javascript_eslint_use_global = 1 g:ale_javascript_eslint_use_global = 1
g:ale_javascript_eslint_executable = 'yarn' g:ale_javascript_eslint_executable = 'yarn'
@ -21,6 +22,7 @@ g:ale_json_eslint_executable = 'yarn'
g:ale_json_eslint_options = 'run eslint' g:ale_json_eslint_options = 'run eslint'
let g:jsdoc_formatter = 'tsdoc' let g:jsdoc_formatter = 'tsdoc'
let g:jsdoc_lehre_path = '/home/schneider/.yarn/bin/lehre'
"autocmd bufwritepost *.js silent !standard --fix % "autocmd bufwritepost *.js silent !standard --fix %
setlocal wildignore+=node_modules setlocal wildignore+=node_modules
@ -29,6 +31,33 @@ setlocal tabstop=4
setlocal shiftwidth=4 setlocal shiftwidth=4
" Create jsdoc with ,h " Create jsdoc with ,h
nnoremap <leader>h :JsDoc<CR>
nnoremap <leader><C-i> :JsDoc<CR>
nnoremap <F8> Biawait <ESC>A nnoremap <F8> Biawait <ESC>A
nnoremap <F2> :Prettier<CR> nnoremap <F2> :Prettier<CR>
lua <<EOF
require'nvim-treesitter.configs'.setup {
textobjects = {
move = {
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = {
["]m"] = "@function.outer",
["]]"] = "@class.outer",
},
goto_next_end = {
["]M"] = "@function.outer",
["]["] = "@class.outer",
},
goto_previous_start = {
["[m"] = "@function.outer",
["[["] = "@class.outer",
},
goto_previous_end = {
["[M"] = "@function.outer",
["[]"] = "@class.outer",
},
},
},
}
EOF

6
zsh/aliases.zsh

@ -1,7 +1,7 @@
# in case its not already thera # in case its not already thera
alias la='ls -la' alias la='ls -la'
alias sagu='sudo apt update && sudo apt dist-upgrade'
alias sagi='sudo apt install '
alias sagu='sudo apt-fast update && sudo apt-fast dist-upgrade'
alias sagi='sudo apt-fast install '
alias notes='vim "+:NV"' alias notes='vim "+:NV"'
alias slog='sudo less /var/log/syslog' alias slog='sudo less /var/log/syslog'
@ -57,3 +57,5 @@ alias ujour='journalctl --user '
alias killbg='kill ${${(v)jobstates##*:*:}%=*}' alias killbg='kill ${${(v)jobstates##*:*:}%=*}'
alias dns='dig +noall +answer any ' alias dns='dig +noall +answer any '
alias standup='cd /home/schneider/git/ && git standup -m 8 -d 7 -s'
Loading…
Cancel
Save