diff --git a/Raspberry Pi/first_install.sh b/Raspberry Pi/first_install.sh index ec3f866..3e0b9fa 100644 --- a/Raspberry Pi/first_install.sh +++ b/Raspberry Pi/first_install.sh @@ -1,7 +1,7 @@ apt-get update apt-get upgrade -apt-get install python3 vim-nox tmux nano zsh git autossh mosh sshuttle fail2ban avahi-daemon ufw lynx npm apticron tidy nmon python-pip python3-pip +apt-get install python3 vim-nox tmux nano zsh git autossh mosh sshuttle fail2ban avahi-daemon ufw lynx npm apticron tidy nmon python-pip python3-pip printer-driver-gutenprint htop ufw allow ssh @@ -16,4 +16,4 @@ npm install -g fixjson # cups remote administration: -# sudo cupsctl --remote-admin \ No newline at end of file +# sudo cupsctl --remote-admin diff --git a/dotfiles/.eslintrc.json b/dotfiles/.eslintrc.json new file mode 100644 index 0000000..1d4d7be --- /dev/null +++ b/dotfiles/.eslintrc.json @@ -0,0 +1,50 @@ +{ + "extends": "eslint:recommended", + "env": { + "node": true, + "es6": true + }, + "parserOptions": { + "ecmaVersion": 2021 + }, + "rules": { + "arrow-spacing": ["warn", { "before": true, "after": true }], + "brace-style": ["error", "1tbs", { "allowSingleLine": true }], + "comma-dangle": ["error", "always-multiline"], + "comma-spacing": "error", + "comma-style": "error", + "curly": ["error", "multi-line", "consistent"], + "dot-location": ["error", "property"], + "handle-callback-err": "off", + "indent": ["error", 4], + "keyword-spacing": "error", + "max-nested-callbacks": ["error", { "max": 4 }], + "max-statements-per-line": ["error", { "max": 2 }], + "no-console": "off", + "no-empty-function": "error", + "no-floating-decimal": "error", + "no-inline-comments": "error", + "no-lonely-if": "error", + "no-multi-spaces": "error", + "no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }], + "no-shadow": ["error", { "allow": ["err", "resolve", "reject"] }], + "no-trailing-spaces": ["error"], + "no-var": "error", + "object-curly-spacing": ["error", "always"], + "prefer-const": "error", + "quotes": ["error", "double"], + "semi": ["error", "never"], + "space-before-blocks": "error", + "space-before-function-paren": ["error", { + "anonymous": "never", + "named": "never", + "asyncArrow": "always" + }], + "space-in-parens": "error", + "space-infix-ops": "error", + "space-unary-ops": "error", + "spaced-comment": "error", + "yoda": "error" + } +} + diff --git a/dotfiles/.vimrc b/dotfiles/.vimrc index 267bda6..a63fa20 100644 --- a/dotfiles/.vimrc +++ b/dotfiles/.vimrc @@ -18,20 +18,20 @@ call plug#begin('~/.vim/bundle') Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']} -" Add git changes to front of the line -Plug 'airblade/vim-gitgutter' - " Java autocomplete -Plug 'artur-shaik/vim-javacomplete2' +" Plug 'artur-shaik/vim-javacomplete2' " Generates a list of todo comments Plug 'chauncey-garrett/vim-tasklist' +" Autocompletion for everything +Plug 'neoclide/coc.nvim', {'branch': 'release'} + " Fuzzy file finder Plug 'ctrlpvim/ctrlp.vim' -" I need this for python - Plug 'davidhalter/jedi-vim' +" Zooms into windows (fullscreen toggle) +Plug 'szw/vim-maximizer' " Linter and analyse tool Plug 'dense-analysis/ale' @@ -264,7 +264,7 @@ let g:user_emmet_leader_key=',' let g:user_emmet_settings = webapi#json#decode(join(readfile(expand('~/.vim/customizations/vim-emmet-mysnippets.json')), "\n")) " jedi-vim: -let g:jedi#popup_on_dot = 1 +"let g:jedi#popup_on_dot = 1 " Peekaboo window width let g:peekaboo_window = 'vert bo 65new' @@ -275,16 +275,23 @@ autocmd FileType java setlocal omnifunc=javacomplete#Complete " tasklist settings let g:tlTokenList = ["FIXME", "TODO", "todo"] " keywords for todos let g:tlWindowPosition = 1 "Open window on bottom, 0 would be top -let g:tlRememberPosition = 0 +let g:tlRememberPosition = 1 map t TaskList " nerdtree settings map :NERDTreeToggle -let NERDTreeIgnore=['\.git$'] +let NERDTreeIgnore=["\.git$"] " nerdcommenter settins let g:NERDCompactSexyComs = 1 -let g:NERDDefaultAlign = 'left' +" Comment symbols are in a straight line and not mimicing the indents of the code +let g:NERDDefaultAlign = "left" +" Add a space between the comment symbol(s) and the code +let NERDSpaceDelims=1 + +" supertab settings +" On autocomplete, start cycling from top to bottom +let g:SuperTabDefaultCompletionType = "" " airline settings let g:airline#extensions#tabline#enabled = 1 " Show buffers as tabs @@ -294,6 +301,7 @@ let g:ale_linters = {'python': ['flake8', 'mypy', 'pylint', 'prospector']} let g:ale_fixers = {'python': ['isort', 'black'], \'json': ['fixjson'], \'html': ['html-beautify', 'tidy'], + \'htmldjango': ['html-beautify'], \'xml': ['xmllint'], \'java': ['uncrustify'], \'javascript': ['prettier', 'xo', 'standard', 'eslint'], @@ -359,6 +367,20 @@ set undofile " Set the character which is used as tab indent marker let g:indentLine_char = '┊' +" CoC install the language extensions I want: +let g:coc_global_extensions = [ + \"coc-json", + \"coc-git", + \"coc-tsserver", + \"coc-html", + \"coc-css", + \"coc-htmldjango", + \"coc-jedi", + \"coc-vetur"] + +" Toggle zoom into windows with vim-maximizer +nnoremap z :MaximizerToggle + " In split views, delete a buffer but keep the window layout. " Found it here: https://vim.fandom.com/wiki/Deleting_a_buffer_without_closing_the_window @@ -434,6 +456,15 @@ nnoremap Kwbd :Kwbd nmap bd Kwbd + +nmap ga (coc-codeaction-line) + +" Go to definition +nmap g (coc-definition) +" nmap gy (coc-type-definition) +" nmap gi (coc-implementation) +" nmap gr (coc-references) + " Load local config if there is one if filereadable($HOME . "/.vimrc.local") source ~/.vimrc.local