5 Commits

Author SHA1 Message Date
Marcel Schneider 2cc2ade083
Add work related settings 2 years ago
Marcel Schneider 735da32680
add ropevim 3 years ago
Marcel Schneider 80ce952260
Add base64 handling 3 years ago
Marcel Schneider 1fa354c839
update settings 3 years ago
Marcel Schneider fc0b98ef90
Add default to limit notification size 3 years ago
  1. 8
      awesome/rc.lua
  2. 35
      init.vim
  3. 2
      tmux/tmux.conf.symlink
  4. 73
      vim/ftplugin/javascript.vim
  5. 2
      vim/ftplugin/python.vim
  6. 16
      zsh/aliases.zsh

8
awesome/rc.lua

@ -51,6 +51,9 @@ end
-- Themes define colours, icons, font and wallpapers.
beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua")
-- Notifications
naughty.config.defaults['icon_size'] = 100
-- This is used later as the default terminal and editor to run.
terminal = "x-terminal-emulator"
editor = os.getenv("EDITOR") or "editor"
@ -354,6 +357,11 @@ globalkeys = gears.table.join(
-- Menubar
awful.key({ modkey }, "p", function() menubar.show() end,
{description = "show the menubar", group = "launcher"})
-- custom
--awful.key({ }, "XF86Launch8", function() awful.spawn.with_shell("xdotool key XF86AudioPrev") end,
--{description = "show the menubar", group = "launcher"}),
--awful.key({ }, "XF86Launch9", function() awful.spawn.with_shell("xdotool key XF86AudioNext") end,
--{description = "show the menubar", group = "launcher"})
)
clientkeys = gears.table.join(

35
init.vim

@ -9,6 +9,7 @@ endif
call plug#begin()
Plug 'tpope/vim-fugitive' " Git integration
Plug 'tpope/vim-rhubarb' " Github integration
Plug 'tpope/vim-sensible' " Defaults everyone can agree on
Plug 'tpope/vim-surround' " better handling of surrounding markers
Plug 'tpope/vim-ragtag' " Enhancement of surround for html
@ -35,6 +36,8 @@ Plug 'nvim-treesitter/nvim-treesitter-textobjects'
Plug 'kyazdani42/nvim-web-devicons' " Icons...
Plug 'mfussenegger/nvim-dap', { 'for': ['typescript', 'javascript', 'python', 'rust'] }
Plug 'lbrayner/vim-rzip' " recursive zip support, needed for yarn pnp
Plug 'kkoomen/vim-doge', { 'do': { -> doge#install() } }
Plug 'taybart/b64.nvim' " en/decode base64 strings
" telescope. Needed for octo.nvim, might replace fzf
Plug 'nvim-lua/popup.nvim'
@ -43,6 +46,8 @@ Plug 'nvim-telescope/telescope.nvim'
Plug 'nvim-telescope/telescope-fzf-native.nvim', { 'do': 'make' } " improve sort performance
Plug 'pwntester/octo.nvim'
"Plug 'github/copilot.vim'
" {{{ CocPlugins
Plug 'neoclide/coc-json', { 'do': 'yarn install --frozen-lockfile' }
Plug 'neoclide/coc-snippets', { 'do': 'yarn install --frozen-lockfile' }
@ -58,6 +63,7 @@ Plug 'neoclide/coc-yaml', { 'do': 'yarn install --frozen-lockfile' }
Plug 'fannheyward/coc-sql', { 'do': 'yarn install --frozen-lockfile' }
Plug 'fannheyward/coc-markdownlint', { 'do': 'yarn install --frozen-lockfile' }
Plug 'fannheyward/coc-pyright', { 'for': 'python', 'do': 'yarn install --frozen-lockfile' }
Plug 'josa42/coc-sh', { 'do': 'yarn install --frozen-lockfile' }
" }}}
" html / templates{{{
@ -71,7 +77,6 @@ Plug 'jvanja/vim-bootstrap4-snippets', { 'for': ['html', 'blade'] }
" JavaScript{{{
Plug 'gavocanov/vim-js-indent', { 'for': [ 'javascript' ]} " JavaScript indent support
Plug 'heavenshell/vim-jsdoc', { 'for': [ 'javascript', 'typescript', 'vue' ], 'do': 'make install'} " Generate JSDoc comments
Plug 'posva/vim-vue', { 'for': [ 'javascript', 'html', 'vue' ] } " vue.js integration
Plug 'kevinoid/vim-jsonc'
"}}}
@ -112,6 +117,11 @@ Plug 'jwalton512/vim-blade', { 'for': 'php' }
Plug 'jeetsukumaran/vim-pythonsense', { 'for': ['python'] } " text objects for python
Plug 'heavenshell/vim-pydocstring', { 'for': ['python'], 'do': 'make install' }
Plug 'anntzer/vim-cython', { 'for': ['python']}
Plug 'python-rope/ropevim'
"}}}
"{{{ CSV
Plug 'chrisbra/csv.vim', { 'for': 'csv' }
"}}}
" All of your Plugins must be added before the following line
@ -240,6 +250,9 @@ nnoremap <leader>tn :tabnew<cr>
nnoremap <F3> :Git<cr>
nnoremap <F4> :Git push<cr>
vnoremap <silent> <leader>be :<c-u>lua require("b64").encode()<cr>
vnoremap <silent> <leader>bd :<c-u>lua require("b64").decode()<cr>
"}}}
" {{{ Textobjects
@ -260,12 +273,12 @@ require'nvim-treesitter.configs'.setup {
["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",
},
-- ["iF"] = {
-- python = "(function_definition) @function",
-- cpp = "(function_definition) @function",
-- c = "(function_definition) @function",
-- java = "(method_declaration) @function",
-- },
},
},
},
@ -302,8 +315,6 @@ let vim_tags_ctags_binary='~/bin/phpctags'"
" Java config
autocmd FileType java setlocal omnifunc=javacomplete#Complete
" Python-mode config
let g:pymode_lint_on_write = 0
" Vimtex{{{
if !exists('g:neocomplete#sources#omni#input_patterns')
@ -493,5 +504,11 @@ require('telescope').load_extension('fzf')
EOF
"}}}
" doge settings
let g:doge_javascript_settings = {
\ 'omit_redundant_param_types': 1,
\}
let g:doge_doc_standard_python = 'google'
let g:doge_mapping_comment_jump_forward = '<c-k>'
"}}}

2
tmux/tmux.conf.symlink

@ -106,4 +106,4 @@ bind p paste-buffer
##############################
source ~/.dotfiles/tmux/theme.sh
run-shell ~/git/build/tmux-yank/yank.tmux

73
vim/ftplugin/javascript.vim

@ -2,24 +2,23 @@ let b:ale_fixers = {}
let b:ale_fixers['javascript'] = ['prettier']
let b:ale_fixers['typescript'] = ['prettier']
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 = '--tab-width 4'
let b:ale_typescript_prettier_options = '--tab-width 4'
let b:ale_fixers['vue'] = ['prettier']
let b:ale_vue_prettier_options = '--no-semi --single-quote'
let b:ale_fix_on_save = 1
let b:ale_javascript_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
g:ale_javascript_eslint_use_global = 1
g:ale_javascript_eslint_executable = 'yarn'
g:ale_javascript_eslint_options = 'run eslint'
g:ale_typescript_eslint_use_global = 1
g:ale_typescript_eslint_executable = 'yarn'
g:ale_typescript_eslint_options = 'run eslint'
g:ale_json_eslint_use_global = 1
g:ale_json_eslint_executable = 'yarn'
g:ale_json_eslint_options = 'run eslint'
let g:ale_javascript_eslint_use_global = 1
let g:ale_javascript_eslint_executable = 'yarn'
let g:ale_javascript_eslint_options = 'run eslint'
let g:ale_typescript_eslint_use_global = 1
let g:ale_typescript_eslint_executable = 'yarn'
let g:ale_typescript_eslint_options = 'run eslint'
let g:ale_json_eslint_use_global = 1
let g:ale_json_eslint_executable = 'yarn'
let g:ale_json_eslint_options = 'run eslint'
let g:jsdoc_formatter = 'tsdoc'
let g:jsdoc_lehre_path = '/home/schneider/.yarn/bin/lehre'
@ -30,34 +29,32 @@ setlocal wildignore+=node_modules
setlocal tabstop=4
setlocal shiftwidth=4
" Create jsdoc with ,h
nnoremap <leader><C-i> :JsDoc<CR>
nnoremap <F8> Biawait <ESC>A
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",
},
},
},
}
-- 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

2
vim/ftplugin/python.vim

@ -10,6 +10,8 @@ let g:ale_fixers['python'] = ['black']
let g:ale_fix_on_save = 1
let g:pymode_run_bind = '<F5>'
let g:pydocstring_formatter = 'google'
let g:ale_virtualenv_dir_names = []
let b:ale_python_pylint_executable = 'python $(which pylint)'
" Make a f-string from normal string
nmap <F8> F"if<ESC>A

16
zsh/aliases.zsh

@ -1,6 +1,6 @@
# in case its not already thera
alias la='ls -la'
alias sagu='sudo apt-fast update && sudo apt-fast dist-upgrade'
alias sagu='sudo apt-fast update && sudo apt-fast dist-upgrade && flatpak update'
alias sagi='sudo apt-fast install '
alias notes='vim "+:NV"'
alias slog='sudo less /var/log/syslog'
@ -18,6 +18,7 @@ alias ga='git add '
alias gc1='git clone --depth 1 '
alias gco='git checkout '
alias gpt='git push && git push --tags'
alias gla='git log --graph --decorate --oneline --all'
#}}}
alias mem='cd /dev/shm'
@ -59,3 +60,16 @@ alias killbg='kill ${${(v)jobstates##*:*:}%=*}'
alias dns='dig +noall +answer any '
alias standup='cd /home/schneider/git/ && git standup -m 8 -d 7 -s'
alias fuu='fuck'
alias jswatch='/home/schneider/.yarn/bin/watch '
function ls3() {
AWS_ACCESS_KEY_ID="S3RVER" AWS_SECRET_ACCESS_KEY="S3RVER" aws --endpoint-url http://0.0.0.0:4568 s3 $@
}
alias backend='aws --profile backend'
alias madness='docker run --rm -it -v $PWD:/docs -p 3005:3000 dannyben/madness'
# {{{ yarn
alias yrb='yarn run build'
#}}}
Loading…
Cancel
Save