diff --git a/any/vim/.SpaceVim.d/autoload/myspacevim.vim b/_backup/.SpaceVim.d/autoload/myspacevim.vim similarity index 100% rename from any/vim/.SpaceVim.d/autoload/myspacevim.vim rename to _backup/.SpaceVim.d/autoload/myspacevim.vim diff --git a/any/vim/.SpaceVim.d/coc-settings.json b/_backup/.SpaceVim.d/coc-settings.json similarity index 100% rename from any/vim/.SpaceVim.d/coc-settings.json rename to _backup/.SpaceVim.d/coc-settings.json diff --git a/any/vim/.SpaceVim.d/init.toml b/_backup/.SpaceVim.d/init.toml similarity index 66% rename from any/vim/.SpaceVim.d/init.toml rename to _backup/.SpaceVim.d/init.toml index 1e0d8d2..1d789fa 100644 --- a/any/vim/.SpaceVim.d/init.toml +++ b/_backup/.SpaceVim.d/init.toml @@ -25,21 +25,22 @@ enable_statusline_mode = false default_indent = 2 expand_tab = false - autocomplete_method = "coc" + lint_engine = "neomake" + # autocomplete_method = "neocomplete" # file manager plugins supported in SpaceVim: # - nerdtree (default) # - vimfiler: you need to build the vimproc.vim in bundle/vimproc.vim directory # - defx: requires +py3 feature filemanager = "nerdtree" - bootstrap_before = 'myspacevim#before' - bootstrap_after = 'myspacevim#after' + bootstrap_before = "myspacevim#before" + bootstrap_after = "myspacevim#after" [[layers]] name = "colorscheme" # Enable autocomplete layer [[layers]] - name = 'autocomplete' + name = "autocomplete" auto_completion_return_key_behavior = "complete" auto_completion_tab_key_behavior = "smart" @@ -47,12 +48,43 @@ name = "checkers" lint_on_the_fly = true lint_on_save = false - show_cursor_error = true - lint_exclude_filetype = ["go", "python", "ruby"] + # show_cursor_error = false + lint_exclude_filetype = [ + # "c", + # "cpp", + # "go", + # "html", + # "javascript", + # "javascriptreact", + "python", + # "ruby", + # "rust", + # "sh", + # "typescript", + # "typescriptreact", + ] [[layers]] - name = 'shell' - default_position = 'top' + name = "lsp" + enabled_clients = [ + # "bash-language-server", + # "clangd", + # "gopls", + # "html-languageserver", + "pylsp", + # "solargraph", + ] + [layers.lsp.completion] + # diagnostic.virtual_text = true + # diagnostic.virtual_text_prefix = "" + # diagnostic.virtual_text_source = "if_many" + # diagnostic.display_length = 5 + enable_auto_popup = true + # formatting.go.gofmt_command = ["goimports"] + +[[layers]] + name = "shell" + default_position = "top" default_height = 30 [[layers]] @@ -60,6 +92,7 @@ [[layers]] name = "lang#python" + enable_typeinfo = true [[layers]] name = "lang#ruby" @@ -99,25 +132,25 @@ name = "telescope" [[custom_plugins]] - repo = 'tpope/vim-commentary' + repo = "tpope/vim-commentary" merge = false [[custom_plugins]] - repo = 'TroyFletcher/vim-colors-synthwave' + repo = "TroyFletcher/vim-colors-synthwave" merge = false [[custom_plugins]] - repo = 'https://gitlab.com/CRThaze/vim-colors-czar' + repo = "https://gitlab.com/CRThaze/vim-colors-czar" merge = false # [[custom_plugins]] -# repo = 'srcery-colors/srcery-vim' +# repo = "srcery-colors/srcery-vim" # merge = false [[custom_plugins]] - repo = 'towolf/vim-helm' + repo = "towolf/vim-helm" merge = false [[custom_plugins]] - repo = 'github/copilot.vim' + repo = "github/copilot.vim" merge = false diff --git a/any/vim/.SpaceVim.d/myspacevim.vim b/_backup/.SpaceVim.d/myspacevim.vim similarity index 77% rename from any/vim/.SpaceVim.d/myspacevim.vim rename to _backup/.SpaceVim.d/myspacevim.vim index 9926db9..ff0024f 100644 --- a/any/vim/.SpaceVim.d/myspacevim.vim +++ b/_backup/.SpaceVim.d/myspacevim.vim @@ -25,18 +25,18 @@ function! myspacevim#after() abort let g:neomake_go_enabled_makers = [] hi Normal guibg=NONE ctermbg=NONE hi EndOfBuffer guibg=NONE ctermbg=NONE - let g:coc_global_extensions = [ - \'coc-json', - \'coc-go', - \'@yaegassy/coc-pylsp', - \'coc-yaml', - \'coc-snippets', - \'coc-lua', - \'coc-solargraph', - \'coc-toml', - \'coc-docker', - \'coc-clangd', - \'coc-tsserver', - \'coc-html' - \] + " let g:coc_global_extensions = [ + " \'coc-json', + " \'coc-go', + " \'@yaegassy/coc-pylsp', + " \'coc-yaml', + " \'coc-snippets', + " \'coc-lua', + " \'coc-solargraph', + " \'coc-toml', + " \'coc-docker', + " \'coc-clangd', + " \'coc-tsserver', + " \'coc-html' + " \] endfunction diff --git a/_backup/.SpaceVim.d/stuff.json b/_backup/.SpaceVim.d/stuff.json new file mode 100644 index 0000000..e28bb6c --- /dev/null +++ b/_backup/.SpaceVim.d/stuff.json @@ -0,0 +1,96 @@ +{ + "languageserver": { + "go": { + "command": "gopls", + "rootPatterns": ["go.mod"], + "trace.server": "verbose", + "filetypes": ["go"] + }, + "bash": { + "command": "bash-language-server", + "args": ["start"], + "filetypes": ["sh"] + }, + "clangd": { + "command": "clangd", + "rootPatterns": ["compile_flags.txt", "compile_commands.json"], + "filetypes": ["c", "cc", "cpp", "c++", "objc", "objcpp"] + }, + "dockerfile": { + "command": "docker-langserver", + "filetypes": ["dockerfile"], + "args": ["--stdio"] + }, + "python": { + "command": "python", + "args": [ + "-mpyls", + "-vv", + "--log-file", + "/tmp/lsp_python.log" + ], + "trace.server": "verbose", + "filetypes": [ + "python" + ], + "settings": { + "pyls": { + "enable": true, + "trace": { + "server": "verbose" + }, + "commandPath": "", + "configurationSources": [ + "pycodestyle" + ], + "plugins": { + "jedi_completion": { + "enabled": true + }, + "jedi_hover": { + "enabled": true + }, + "jedi_references": { + "enabled": true + }, + "jedi_signature_help": { + "enabled": true + }, + "jedi_symbols": { + "enabled": true, + "all_scopes": true + }, + "mccabe": { + "enabled": true, + "threshold": 15 + }, + "preload": { + "enabled": true + }, + "pycodestyle": { + "enabled": true + }, + "pydocstyle": { + "enabled": false, + "match": "(?!test_).*\\.py", + "matchDir": "[^\\.].*" + }, + "pyflakes": { + "enabled": true + }, + "rope_completion": { + "enabled": true + }, + "yapf": { + "enabled": true + }, + "pylsp_mypy": { + "enabled": true, + "live_mode": false + } + } + } + } + } + } +} diff --git a/any/vim/.SpaceVim/coc-settings.json b/_backup/.SpaceVim/coc-settings.json similarity index 51% rename from any/vim/.SpaceVim/coc-settings.json rename to _backup/.SpaceVim/coc-settings.json index 8241454..2229509 100644 --- a/any/vim/.SpaceVim/coc-settings.json +++ b/_backup/.SpaceVim/coc-settings.json @@ -1,5 +1,6 @@ { "pylsp.builtin.enableInstallPylspMypy": true, "yaml.enable": true, - "yaml.validate": true + "yaml.validate": true, + "snippets.ultisnips.pythonPrompt": false } diff --git a/any/vim/.old-vim/coc-settings.json b/any/vim/.old-vim/coc-settings.json deleted file mode 100644 index b1418ba..0000000 --- a/any/vim/.old-vim/coc-settings.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "suggest.noselect": false, - "diagnostic.errorSign": "✘", - "diagnostic.warningSign": "!", - "diagnostic.infoSign": "?", - "diagnostic.checkCurrentLine": true, - "coc.preferences.formatOnSaveFiletypes": [ - "javascript", - "html", - "json", - "css", - "scss", - "go" - ], - "coc.preferences.hoverTarget": "float", - "languageserver": { - "golang": { - "command": "gopls", - "rootPatterns": ["go.mod"], - "filetypes": ["go"] - } - }, - "go.goplsOptions": { - "staticcheck": true - } -} diff --git a/any/vim/.old-vim/vimrc b/any/vim/.old-vim/vimrc deleted file mode 100644 index 2f9f227..0000000 --- a/any/vim/.old-vim/vimrc +++ /dev/null @@ -1,311 +0,0 @@ -call plug#begin('~/.vim/plugged') -Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } " Amazing combination of features. -"Plug 'godoctor/godoctor.vim' " Some refactoring tools -Plug 'plytophogy/vim-virtualenv' -Plug 'mg979/vim-visual-multi' -Plug 'airblade/vim-rooter' -Plug 'vim-airline/vim-airline' -Plug 'vim-airline/vim-airline-themes' -" Plug 'majutsushi/tagbar' " install exuberant-ctags -Plug 'tpope/vim-commentary' -Plug 'tpope/vim-fugitive' -" Plug 'SirVer/ultisnips' -" Plug 'neomake/neomake' -" Plug 'godlygeek/tabular' -Plug 'lepture/vim-jinja' -Plug 'b4b4r07/vim-hcl' -Plug 'hashivim/vim-packer' -Plug 'hashivim/vim-terraform' -" Plug 'scrooloose/nerdtree' -Plug 'preservim/nerdtree' -Plug 'PotatoesMaster/i3-vim-syntax' -"Plug 'tpope/vim-surround' -"Plugin 'jiangmiao/auto-pairs' -"Plug 'elzr/vim-json' -Plug 'tsandall/vim-rego' -Plug 'honza/vim-snippets' -if !has('nvim') - " Plugins for when you're not using neovim -endif -if has('nvim') - " Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'} - Plug 'neoclide/coc.nvim', {'branch': 'release'} - "Plug 'jodosha/vim-godebug' " Debugger integration via delve -endif -" All of your Plugs must be added before the following line -call plug#end() - -""""""""""""""""" -" Plugin Config " -""""""""""""""""" -""" deoplete -if has('nvim') - " --------------------------------------------------------------------------- - " coc.nvim default settings - " --------------------------------------------------------------------------- - - " if hidden is not set, TextEdit might fail. - set hidden - " Better display for messages - set cmdheight=2 - " Smaller updatetime for CursorHold & CursorHoldI - set updatetime=300 - " don't give |ins-completion-menu| messages. - set shortmess+=c - " always show signcolumns - set signcolumn=yes - - " Use tab for trigger completion with characters ahead and navigate. - " Use command ':verbose imap ' to make sure tab is not mapped by other plugin. - inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ coc#refresh() - inoremap pumvisible() ? "\" : "\" - - function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' - endfunction - - " Use to trigger completion. - inoremap coc#refresh() - - " Use `[c` and `]c` to navigate diagnostics - nmap [c (coc-diagnostic-prev) - nmap ]c (coc-diagnostic-next) - - " Remap keys for gotos - nmap gd (coc-definition) - nmap gy (coc-type-definition) - nmap gi (coc-implementation) - nmap gr (coc-references) - - " Use U to show documentation in preview window - nnoremap U :call show_documentation() - - " Remap for rename current word - nmap rn (coc-rename) - - " Remap for format selected region - vmap f (coc-format-selected) - nmap f (coc-format-selected) - " Show all diagnostics - nnoremap a :CocList diagnostics - " Manage extensions - nnoremap e :CocList extensions - " Show commands - nnoremap c :CocList commands - " Find symbol of current document - nnoremap o :CocList outline - " Search workspace symbols - nnoremap s :CocList -I symbols - " Do default action for next item. - nnoremap j :CocNext - " Do default action for previous item. - nnoremap k :CocPrev - " Resume latest coc list - nnoremap p :CocListResumen - - """" Snippets - - " " Use for trigger snippet expand. - " imap (coc-snippets-expand) - - " " Use for select text for visual placeholder of snippet. - " vmap (coc-snippets-select) - - " " Use for jump to next placeholder, it's default of coc.nvim - " let g:coc_snippet_next = '' - - " " Use for jump to previous placeholder, it's default of coc.nvim - " let g:coc_snippet_prev = '' - - " " Use for both expand and jump (make expand higher priority.) - " imap (coc-snippets-expand-jump) - - " " Use x for convert visual selected code to snippet - " xmap x (coc-convert-snippet) - - inoremap - \ pumvisible() ? coc#_select_confirm() : - \ coc#expandableOrJumpable() ? "\=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\" : - \ check_back_space() ? "\" : - \ coc#refresh() - - function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' - endfunction - - let g:coc_snippet_next = '' -endif - - -""" tagbar -nmap :TagbarToggle -let g:tagbar_type_go = { - \ 'ctagstype' : 'go', - \ 'kinds' : [ - \ 'p:package', - \ 'i:imports:1', - \ 'c:constants', - \ 'v:variables', - \ 't:types', - \ 'n:interfaces', - \ 'w:fields', - \ 'e:embedded', - \ 'm:methods', - \ 'r:constructor', - \ 'f:functions' - \ ], - \ 'sro' : '.', - \ 'kind2scope' : { - \ 't' : 'ctype', - \ 'n' : 'ntype' - \ }, - \ 'scope2kind' : { - \ 'ctype' : 't', - \ 'ntype' : 'n' - \ }, - \ 'ctagsbin' : 'gotags', - \ 'ctagsargs' : '-sort -silent' -\ } - - -""" vim-rooter -" let g:rooter_use_lcd = 1 -let g:rooter_cd_cmd="lcd" -let g:rooter_silent_chdir = 1 -let g:rooter_resolve_links = 1 - - -""" vim-terraform -" let g:terraform_fmt_on_save=1 -"autocmd filetype tf set syntax=terraform -autocmd FileType terraform setlocal commentstring=#%s - - -""" vim-jinja -autocmd BufNewFile,BufRead *.j2 set filetype=jinja - - -""" vim-go -" disable all linters as that is taken care of by coc.nvim -let g:go_diagnostics_enabled = 0 -let g:go_metalinter_enabled = [] - -" don't jump to errors after metalinter is invoked -let g:go_jump_to_error = 0 - -" run go imports on file save -let g:go_fmt_command = "gofmt" - -" automatically highlight variable your cursor is on -let g:go_auto_sameids = 0 - -let g:go_highlight_types = 1 -let g:go_highlight_types = 1 -let g:go_highlight_fields = 1 -let g:go_highlight_functions = 1 -let g:go_highlight_function_calls = 1 -let g:go_highlight_operators = 1 -let g:go_highlight_extra_types = 1 -let g:go_highlight_build_constraints = 1 -let g:go_highlight_generate_tags = 1 - -" let g:go_def_mode='gopls' -" let g:go_info_mode='gopls' -let g:go_term_enabled = 1 - -" disable vim-go :GoDef short cut (gd) -" this is handled by LanguageClient [LC] -let g:go_def_mapping_enabled = 0 - - -""" neomake -" Full config: when writing or reading a buffer, and on changes in insert and -" normal mode (after 1s; no delay when writing). -" call neomake#configure#automake('nrwi', 500) - - -""" NERDtree -" nnoremap n :NERDTreeFocus -" nnoremap :NERDTree -nnoremap :NERDTreeToggle -nnoremap :NERDTreeFind - -" Start NERDTree when Vim starts with a directory argument. -autocmd StdinReadPre * let s:std_in=1 -autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in') | - \ execute 'NERDTree' argv()[0] | wincmd p | enew | execute 'cd '.argv()[0] | endif -" Exit Vim if NERDTree is the only window remaining in the only tab. -autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif -" Close the tab if NERDTree is the only window remaining in it. -autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif -" If another buffer tries to replace NERDTree, put it in the other window, and bring back NERDTree. -autocmd BufEnter * if bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 | - \ let buf=bufnr() | buffer# | execute "normal! \w" | execute 'buffer'.buf | endif - - -""" airline -let g:airline_theme='powerlineish' " is a valid theme name -let g:airline_powerline_fonts = 1 -" powerline symbols -let g:airline_left_sep = '' -let g:airline_left_alt_sep = '' -let g:airline_right_sep = '' -let g:airline_right_alt_sep = '' -let g:airline_symbols = {} -let g:airline_symbols.branch = '' -let g:airline_symbols.readonly = '' -let g:airline_symbols.linenr = '☰' -let g:airline_symbols.maxlinenr = '' -let g:airline_symbols.dirty='⚡' - - -""""""""""""""""""""" -" Personal Settings " -""""""""""""""""""""" -set number - -colorscheme Czar -hi Normal guibg=NONE ctermbg=NONE - -command! W w !sudo tee >/dev/null % - -set backupdir=~/.vim/tmp/backup// -set directory=~/.vim/tmp/swap// -set undodir=~/.vim/tmp/undo// - -set completeopt-=preview - -set colorcolumn=80 -autocmd Filetype java setlocal colorcolumn=100 -autocmd Filetype html setlocal colorcolumn=100 -autocmd Filetype go setlocal colorcolumn=100 -autocmd Filetype netrw setlocal colorcolumn= - -set tabstop=2 -set shiftwidth=2 -set noexpandtab -autocmd FileType python setlocal expandtab -autocmd FileType python setlocal tabstop=4 -autocmd FileType python setlocal shiftwidth=4 -" autocmd filetype json setlocal expandtab -autocmd filetype tf setlocal expandtab -autocmd filetype terraform setlocal expandtab -autocmd FileType terraform setlocal tabstop=4 -autocmd FileType terraform setlocal shiftwidth=4 - -"set list lcs=tab:\┆\ ,trail:▓,space:. -"set list lcs=tab:\⇥\ ,trail:▓,space:. -set list lcs=tab:\⇥\ ,trail:▓ - -""" Help Navigation -autocmd FileType help nnoremap -autocmd FileType help nnoremap -autocmd FileType help nnoremap o /'\l\{2,\}' -autocmd FileType help nnoremap O ?'\l\{2,\}' -autocmd FileType help nnoremap s /\|\zs\S\+\ze\| -autocmd FileType help nnoremap S ?\|\zs\S\+\ze\| diff --git a/any/vim/.old-vim/.gitignore b/any/vim/.vim/.gitignore similarity index 100% rename from any/vim/.old-vim/.gitignore rename to any/vim/.vim/.gitignore diff --git a/any/vim/.old-vim/autoload/plug.vim b/any/vim/.vim/autoload/plug.vim similarity index 100% rename from any/vim/.old-vim/autoload/plug.vim rename to any/vim/.vim/autoload/plug.vim diff --git a/any/vim/.old-vim/autoload/plug.vim.old b/any/vim/.vim/autoload/plug.vim.old similarity index 100% rename from any/vim/.old-vim/autoload/plug.vim.old rename to any/vim/.vim/autoload/plug.vim.old diff --git a/any/vim/.vim/coc-settings.json b/any/vim/.vim/coc-settings.json new file mode 100644 index 0000000..d79026a --- /dev/null +++ b/any/vim/.vim/coc-settings.json @@ -0,0 +1,18 @@ +{ + "pylsp.builtin.enableInstallPylspMypy": true, + "pylsp.builtin.enableInstallPylsIsort": true, + "pylsp.builtin.enableInstallPylspRope": true, + "pylsp.plugins.pyflakes.enabled": false, + "pylsp.plugins.pylint.enabled": false, + "pylsp.plugins.pycodestyle.enabled": false, + "pylsp.plugins.autopep8.enabled": false, + "pylsp.plugins.flake8.enabled": true, + "pylsp.plugins.yapf.enabled": true, + "pylsp.plugins.mccabe.enabled": true, + "pylsp.plugins.pydocstyle.enabled": true, + "pylsp.plugins.pydocstyle.convention": "google", + "pydocstring.formatter": "google", + "yaml.enable": true, + "yaml.validate": true, + "snippets.ultisnips.pythonPrompt": false +} diff --git a/any/vim/.old-vim/colors/Czar.vim b/any/vim/.vim/colors/Czar.vim similarity index 100% rename from any/vim/.old-vim/colors/Czar.vim rename to any/vim/.vim/colors/Czar.vim diff --git a/any/vim/.old-vim/colors/inkpot.vim b/any/vim/.vim/colors/inkpot.vim similarity index 100% rename from any/vim/.old-vim/colors/inkpot.vim rename to any/vim/.vim/colors/inkpot.vim diff --git a/any/vim/.old-vim/colors/srcery.vim b/any/vim/.vim/colors/srcery.vim similarity index 100% rename from any/vim/.old-vim/colors/srcery.vim rename to any/vim/.vim/colors/srcery.vim diff --git a/any/vim/.old-vim/colors/synthwave.vim b/any/vim/.vim/colors/synthwave.vim similarity index 100% rename from any/vim/.old-vim/colors/synthwave.vim rename to any/vim/.vim/colors/synthwave.vim diff --git a/any/vim/.old-vim/colors/twilight.vim b/any/vim/.vim/colors/twilight.vim similarity index 100% rename from any/vim/.old-vim/colors/twilight.vim rename to any/vim/.vim/colors/twilight.vim diff --git a/any/vim/.old-vim/init.vim b/any/vim/.vim/init.vim similarity index 100% rename from any/vim/.old-vim/init.vim rename to any/vim/.vim/init.vim diff --git a/any/vim/.old-vim/plugged/.gitkeep b/any/vim/.vim/plugged/.gitkeep similarity index 100% rename from any/vim/.old-vim/plugged/.gitkeep rename to any/vim/.vim/plugged/.gitkeep diff --git a/any/vim/.old-vim/spell/en.utf-8.add b/any/vim/.vim/spell/en.utf-8.add similarity index 100% rename from any/vim/.old-vim/spell/en.utf-8.add rename to any/vim/.vim/spell/en.utf-8.add diff --git a/any/vim/.old-vim/spell/en.utf-8.add.spl b/any/vim/.vim/spell/en.utf-8.add.spl similarity index 100% rename from any/vim/.old-vim/spell/en.utf-8.add.spl rename to any/vim/.vim/spell/en.utf-8.add.spl diff --git a/any/vim/.old-vim/tmp/.gitignore b/any/vim/.vim/tmp/.gitignore similarity index 100% rename from any/vim/.old-vim/tmp/.gitignore rename to any/vim/.vim/tmp/.gitignore diff --git a/any/vim/.old-vim/tmp/backup/.gitkeep b/any/vim/.vim/tmp/backup/.gitkeep similarity index 100% rename from any/vim/.old-vim/tmp/backup/.gitkeep rename to any/vim/.vim/tmp/backup/.gitkeep diff --git a/any/vim/.old-vim/tmp/swap/.gitkeep b/any/vim/.vim/tmp/swap/.gitkeep similarity index 100% rename from any/vim/.old-vim/tmp/swap/.gitkeep rename to any/vim/.vim/tmp/swap/.gitkeep diff --git a/any/vim/.old-vim/tmp/undo/.gitkeep b/any/vim/.vim/tmp/undo/.gitkeep similarity index 100% rename from any/vim/.old-vim/tmp/undo/.gitkeep rename to any/vim/.vim/tmp/undo/.gitkeep diff --git a/any/vim/.vim/vimrc b/any/vim/.vim/vimrc new file mode 100644 index 0000000..6803563 --- /dev/null +++ b/any/vim/.vim/vimrc @@ -0,0 +1,429 @@ +call plug#begin('~/.vim/plugged') +Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } " Amazing combination of features. +Plug 'jmcantrell/vim-virtualenv' +" Plug 'mg979/vim-visual-multi' +Plug 'airblade/vim-rooter' +Plug 'vim-airline/vim-airline' +Plug 'vim-airline/vim-airline-themes' +Plug 'majutsushi/tagbar' " install exuberant-ctags +Plug 'tpope/vim-commentary' +Plug 'tpope/vim-fugitive' +Plug 'airblade/vim-gitgutter' +" Plug 'SirVer/ultisnips' +" Plug 'neomake/neomake' +" Plug 'godlygeek/tabular' +" Plug 'lepture/vim-jinja' +" Plug 'b4b4r07/vim-hcl' +" Plug 'hashivim/vim-packer' +" Plug 'hashivim/vim-terraform' +" Plug 'scrooloose/nerdtree' +Plug 'preservim/nerdtree' +Plug 'ryanoasis/vim-devicons' +" Plug 'PotatoesMaster/i3-vim-syntax' +"Plug 'tpope/vim-surround' +"Plugin 'jiangmiao/auto-pairs' +"Plug 'elzr/vim-json' +" Plug 'tsandall/vim-rego' +" Plug 'honza/vim-snippets' +Plug 'psliwka/vim-smoothie' +Plug 'Yggdroot/indentLine' +if !has('nvim') + " Plugins for when you're not using neovim +endif +if has('nvim') + Plug 'nvim-lua/plenary.nvim' + Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.1' } + " Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'} + Plug 'neoclide/coc.nvim', {'branch': 'release'} + "Plug 'jodosha/vim-godebug' " Debugger integration via delve + Plug 'github/copilot.vim' + Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} +endif +" All of your Plugs must be added before the following line +call plug#end() + +""""""""""""""""" +" Plugin Config " +""""""""""""""""" +let mapleader = " " + +""" coc +if has('nvim') + " --------------------------------------------------------------------------- + " coc.nvim default settings + " --------------------------------------------------------------------------- + let g:coc_global_extensions = [ + \'coc-json', + \'coc-go', + \'@yaegassy/coc-pylsp', + \'coc-pydocstring', + \'coc-yaml', + \'coc-snippets', + \'coc-lua', + \'coc-solargraph', + \'coc-toml', + \'coc-docker', + \'coc-clangd', + \'coc-tsserver', + \'coc-html' + \] + + " Some servers have issues with backup files, see #649 + " set nobackup + " set nowritebackup + + " Having longer updatetime (default is 4000 ms = 4s) leads to noticeable + " delays and poor user experience + set updatetime=300 + + " Always show the signcolumn, otherwise it would shift the text each time + " diagnostics appear/become resolved + " set signcolumn=yes + + " Make to accept selected completion item or notify coc.nvim to format + " u breaks current undo, please make your own choice + inoremap coc#pum#visible() ? coc#pum#confirm() + \: "\u\\=coc#on_enter()\" + + " function! CheckBackspace() abort + " let col = col('.') - 1 + " return !col || getline('.')[col - 1] =~# '\s' + " endfunction + + " Use `[g` and `]g` to navigate diagnostics + " Use `:CocDiagnostics` to get all diagnostics of current buffer in location list + nmap [g (coc-diagnostic-prev) + nmap ]g (coc-diagnostic-next) + + " GoTo code navigation + nmap gd (coc-definition) + nmap gy (coc-type-definition) + nmap gi (coc-implementation) + nmap gr (coc-references) + + " Use K to show documentation in preview window + nnoremap K :call ShowDocumentation() + + function! ShowDocumentation() + if CocAction('hasProvider', 'hover') + call CocActionAsync('doHover') + else + call feedkeys('K', 'in') + endif + endfunction + + " Highlight the symbol and its references when holding the cursor + autocmd CursorHold * silent call CocActionAsync('highlight') + + " Symbol renaming + nmap rn (coc-rename) + + " Formatting selected code + xmap f (coc-format-selected) + nmap f (coc-format-selected) + + augroup mygroup + autocmd! + " Setup formatexpr specified filetype(s) + autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') + " Update signature help on jump placeholder + autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') + augroup end + + " Applying code actions to the selected code block + " Example: `aap` for current paragraph + xmap a (coc-codeaction-selected) + nmap a (coc-codeaction-selected) + + " Remap keys for applying code actions at the cursor position + nmap ac (coc-codeaction-cursor) + " Remap keys for apply code actions affect whole buffer + nmap as (coc-codeaction-source) + " Apply the most preferred quickfix action to fix diagnostic on the current line + nmap qf (coc-fix-current) + + " Remap keys for applying refactor code actions + nmap re (coc-codeaction-refactor) + xmap r (coc-codeaction-refactor-selected) + nmap r (coc-codeaction-refactor-selected) + + " Run the Code Lens action on the current line + nmap cl (coc-codelens-action) + + " Map function and class text objects + " NOTE: Requires 'textDocument.documentSymbol' support from the language server + xmap if (coc-funcobj-i) + omap if (coc-funcobj-i) + xmap af (coc-funcobj-a) + omap af (coc-funcobj-a) + xmap ic (coc-classobj-i) + omap ic (coc-classobj-i) + xmap ac (coc-classobj-a) + omap ac (coc-classobj-a) + + " Remap and to scroll float windows/popups + " if has('nvim-0.4.0') || has('patch-8.2.0750') + " nnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" + " nnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" + " inoremap coc#float#has_scroll() ? "\=coc#float#scroll(1)\" : "\" + " inoremap coc#float#has_scroll() ? "\=coc#float#scroll(0)\" : "\" + " vnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" + " vnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" + " endif + + " Code Gen + nmap ga (coc-codeaction-line) + xmap ga (coc-codeaction-selected) + nmap gA (coc-codeaction) + + " Use CTRL-S for selections ranges + " Requires 'textDocument/selectionRange' support of language server + nmap (coc-range-select) + xmap (coc-range-select) + + " Add `:Format` command to format current buffer + command! -nargs=0 Format :call CocActionAsync('format') + + " Add `:Fold` command to fold current buffer + command! -nargs=? Fold :call CocAction('fold', ) + + " Add `:OR` command for organize imports of the current buffer + command! -nargs=0 OR :call CocActionAsync('runCommand', 'editor.action.organizeImport') + + " Add (Neo)Vim's native statusline support + " NOTE: Please see `:h coc-status` for integrations with external plugins that + " provide custom statusline: lightline.vim, vim-airline + + " Mappings for CoCList + " Show all diagnostics + nnoremap a :CocList diagnostics + " Manage extensions + nnoremap e :CocList extensions + " Show commands + nnoremap c :CocList commands + " Find symbol of current document + nnoremap o :CocList outline + " Search workspace symbols + nnoremap s :CocList -I symbols + " Do default action for next item + nnoremap j :CocNext + " Do default action for previous item + nnoremap k :CocPrev + " Resume latest coc list + nnoremap p :CocListResume + + """" Snippets + + " Use for trigger snippet expand. + imap (coc-snippets-expand) + + " Use for select text for visual placeholder of snippet. + vmap (coc-snippets-select) + + " Use for jump to next placeholder, it's default of coc.nvim + let g:coc_snippet_next = '' + + " Use for jump to previous placeholder, it's default of coc.nvim + let g:coc_snippet_prev = '' + + " Use for both expand and jump (make expand higher priority.) + imap (coc-snippets-expand-jump) + + " Use x for convert visual selected code to snippet + xmap x (coc-convert-snippet) + + " inoremap + " \ pumvisible() ? coc#_select_confirm() : + " \ coc#expandableOrJumpable() ? "\=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\" : + " \ check_back_space() ? "\" : + " \ coc#refresh() + + " function! s:check_back_space() abort + " let col = col('.') - 1 + " return !col || getline('.')[col - 1] =~# '\s' + " endfunction + + " let g:coc_snippet_next = '' +endif + + +""" tagbar +nmap b :TagbarToggle +" let g:tagbar_type_go = { +" \ 'ctagstype' : 'go', +" \ 'kinds' : [ +" \ 'p:package', +" \ 'i:imports:1', +" \ 'c:constants', +" \ 'v:variables', +" \ 't:types', +" \ 'n:interfaces', +" \ 'w:fields', +" \ 'e:embedded', +" \ 'm:methods', +" \ 'r:constructor', +" \ 'f:functions' +" \ ], +" \ 'sro' : '.', +" \ 'kind2scope' : { +" \ 't' : 'ctype', +" \ 'n' : 'ntype' +" \ }, +" \ 'scope2kind' : { +" \ 'ctype' : 't', +" \ 'ntype' : 'n' +" \ }, +" \ 'ctagsbin' : 'gotags', +" \ 'ctagsargs' : '-sort -silent' +" \ } + + +""" vim-rooter +" let g:rooter_use_lcd = 1 +let g:rooter_cd_cmd="lcd" +let g:rooter_silent_chdir = 1 +let g:rooter_resolve_links = 1 + + +""" vim-terraform +" let g:terraform_fmt_on_save=1 +"autocmd filetype tf set syntax=terraform +" autocmd FileType terraform setlocal commentstring=#%s + + +""" vim-jinja +" autocmd BufNewFile,BufRead *.j2 set filetype=jinja + + +""" vim-go +" " disable all linters as that is taken care of by coc.nvim +" let g:go_diagnostics_enabled = 0 +" let g:go_metalinter_enabled = [] + +" " don't jump to errors after metalinter is invoked +" let g:go_jump_to_error = 0 + +" " run go imports on file save +" let g:go_fmt_command = "gofmt" + +" " automatically highlight variable your cursor is on +" let g:go_auto_sameids = 0 + +" let g:go_highlight_types = 1 +" let g:go_highlight_types = 1 +" let g:go_highlight_fields = 1 +" let g:go_highlight_functions = 1 +" let g:go_highlight_function_calls = 1 +" let g:go_highlight_operators = 1 +" let g:go_highlight_extra_types = 1 +" let g:go_highlight_build_constraints = 1 +" let g:go_highlight_generate_tags = 1 + +" " let g:go_def_mode='gopls' +" " let g:go_info_mode='gopls' +" let g:go_term_enabled = 1 + +" " disable vim-go :GoDef short cut (gd) +" " this is handled by LanguageClient [LC] +" let g:go_def_mapping_enabled = 0 + + +""" neomake +" Full config: when writing or reading a buffer, and on changes in insert and +" normal mode (after 1s; no delay when writing). +" call neomake#configure#automake('nrwi', 500) + + +""" NERDtree +nnoremap n :NERDTreeFocus +nnoremap t :NERDTreeToggle +nnoremap o :NERDTreeFind + +" Open NERDTree on the right side of the window. +let g:NERDTreeWinPos = "right" + +" Start NERDTree when Vim starts with a directory argument. +autocmd StdinReadPre * let s:std_in=1 +autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in') | + \ execute 'NERDTree' argv()[0] | wincmd p | enew | execute 'cd '.argv()[0] | endif +" Start NERDTree when Vim is started without file arguments. +autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | endif +" Exit Vim if NERDTree is the only window remaining in the only tab. +autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif +" Close the tab if NERDTree is the only window remaining in it. +autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif +" If another buffer tries to replace NERDTree, put it in the other window, and bring back NERDTree. +autocmd BufEnter * if bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 | + \ let buf=bufnr() | buffer# | execute "normal! \w" | execute 'buffer'.buf | endif + + + +""" airline +let g:airline_theme='powerlineish' " is a valid theme name +let g:airline_powerline_fonts = 1 +let g:airline#extensions#tabline#enabled = 1 +let g:airline#extensions#tabline#formatter = 'unique_tail_improved' +let g:airline#extensions#virtualenv#enabled = 1 +let g:airline#extensions#virtualenv#ft = ['python', 'markdown', 'dosini', 'text', 'make'] + +" customize the statusline. +" let g:airline_section_w=%{virtualenv#statusline()} +" let g:airline_section_w = %{coc#status()}%{get(b:,'coc_current_function','')} + +""" Telescope +" Find files using Telescope command-line sugar. +nnoremap ff Telescope find_files +nnoremap fg Telescope live_grep +nnoremap fb Telescope buffers +nnoremap fh Telescope help_tags + +""" TreeSitter +luafile ~/.vim/vimrc.d/treesitter.lua + + +""""""""""""""""""""" +" Personal Settings " +""""""""""""""""""""" +set number + +colorscheme Czar +hi Normal guibg=NONE ctermbg=NONE + +command! W w !sudo tee >/dev/null % + +set backupdir=~/.vim/tmp/backup// +set directory=~/.vim/tmp/swap// +set undodir=~/.vim/tmp/undo// + +set completeopt-=preview + +"set list lcs=tab:\┆\ ,trail:▓,space:. +"set list lcs=tab:\⇥\ ,trail:▓,space:. +set list lcs=tab:\⇥\ ,trail:▓ + +set colorcolumn=80 +autocmd Filetype java setlocal colorcolumn=100 +autocmd Filetype html setlocal colorcolumn=100 +autocmd Filetype go setlocal colorcolumn=100 +autocmd Filetype netrw setlocal colorcolumn= +autocmd Filetype netrw setlocal signcolumn=0 + +set tabstop=2 +set shiftwidth=2 +set noexpandtab +autocmd FileType python setlocal expandtab +autocmd FileType python setlocal tabstop=4 +autocmd FileType python setlocal shiftwidth=4 +" autocmd filetype json setlocal expandtab +autocmd filetype tf setlocal expandtab +autocmd filetype terraform setlocal expandtab +autocmd FileType terraform setlocal tabstop=4 +autocmd FileType terraform setlocal shiftwidth=4 + +""" Help Navigation +" autocmd FileType help nnoremap +" autocmd FileType help nnoremap +" autocmd FileType help nnoremap o /'\l\{2,\}' +" autocmd FileType help nnoremap O ?'\l\{2,\}' +" autocmd FileType help nnoremap s /\|\zs\S\+\ze\| +" autocmd FileType help nnoremap S ?\|\zs\S\+\ze\| diff --git a/any/vim/.vim/vimrc.d/treesitter.lua b/any/vim/.vim/vimrc.d/treesitter.lua new file mode 100644 index 0000000..645eba4 --- /dev/null +++ b/any/vim/.vim/vimrc.d/treesitter.lua @@ -0,0 +1,41 @@ +require("nvim-treesitter.configs").setup({ + ensure_installed = { + "bash", + "c", + "cpp", + "css", + "dockerfile", + "git_rebase", + "gitcommit", + "gitignore", + "go", + "gomod", + "gosum", + "hcl", + "html", + "java", + "javascript", + "json", + "lua", + "make", + "markdown", + "perl", + "rego", + "ruby", + "rust", + "sql", + "terraform", + "toml", + "tsx", + "typescript", + "vim", + "yaml", + }, + sync_install = false, + auto_install = true, + highlight = { + enable = true, + disable = { "markdown", "make" }, + additional_vim_regex_highlighting = false, + }, +}) diff --git a/any/wezterm/.wezterm.lua b/any/wezterm/.wezterm.lua index 2ad9b81..c96d29f 100644 --- a/any/wezterm/.wezterm.lua +++ b/any/wezterm/.wezterm.lua @@ -1,49 +1,53 @@ local wezterm = require 'wezterm' return { - font = wezterm.font("FiraCode Nerd Font", {weight=450, stretch="Normal", style="Normal"}), + font = wezterm.font("FiraCode Nerd Font", {weight=450, stretch="Normal", style="Normal"}), font_rules = { - -- For Bold-but-not-italic text, use this relatively bold font, and override - -- its color to a tomato-red color to make bold text really stand out. - { - intensity = 'Bold', - italic = false, + -- For Bold-but-not-italic text, use this relatively bold font, and override + -- its color to a tomato-red color to make bold text really stand out. + { + intensity = 'Bold', + italic = false, font = wezterm.font("FiraCode Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}), - }, + }, - -- Bold-and-italic - { - intensity = 'Bold', - italic = true, + -- Bold-and-italic + { + intensity = 'Bold', + italic = true, font = wezterm.font("FiraCode Nerd Font", {weight="Bold", stretch="Normal", style="Normal"}), - }, + }, - -- normal-intensity-and-italic - { - intensity = 'Normal', - italic = true, + -- normal-intensity-and-italic + { + intensity = 'Normal', + italic = true, font = wezterm.font("FiraCode Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}), - }, + }, - -- half-intensity-and-italic (half-bright or dim); use a lighter weight font - { - intensity = 'Half', - italic = true, + -- half-intensity-and-italic (half-bright or dim); use a lighter weight font + { + intensity = 'Half', + italic = true, font = wezterm.font("FiraCode Nerd Font", {weight="Light", stretch="Normal", style="Normal"}), - }, + }, - -- half-intensity-and-not-italic - { - intensity = 'Half', - italic = false, + -- half-intensity-and-not-italic + { + intensity = 'Half', + italic = false, font = wezterm.font("FiraCode Nerd Font", {weight="Light", stretch="Normal", style="Normal"}), - }, - }, + }, + }, font_size = 16.0, - color_scheme = 'Srcery (Gogh)', + color_scheme = 'Srcery (Gogh)', colors = { cursor_bg = 'rgba(235,219,178,0)', cursor_fg = 'rgba(0,0,0,0)', }, + inactive_pane_hsb = { + saturation = 0.5, + brightness = 0.1, + }, window_background_opacity = 0.90, use_fancy_tab_bar = false, tab_bar_at_bottom = true, diff --git a/linux-gnu/gnome-extensions/.local/share/gnome-shell/extensions/hide_clock@grantmcwilliams.com/hide_clock@grantmcwilliams.com/extension.js b/linux-gnu/gnome-extensions/.local/share/gnome-shell/extensions/hide_clock@grantmcwilliams.com/hide_clock@grantmcwilliams.com/extension.js new file mode 100644 index 0000000..c6f6357 --- /dev/null +++ b/linux-gnu/gnome-extensions/.local/share/gnome-shell/extensions/hide_clock@grantmcwilliams.com/hide_clock@grantmcwilliams.com/extension.js @@ -0,0 +1,15 @@ +const Main = imports.ui.main; +const Panel = Main.panel; + +let dateMenu = Panel.statusArea.dateMenu; + +function enable() { + dateMenu.container.hide(); +} + +function disable() { + dateMenu.container.show(); +} + +function init() { +} diff --git a/linux-gnu/gnome-extensions/.local/share/gnome-shell/extensions/hide_clock@grantmcwilliams.com/hide_clock@grantmcwilliams.com/metadata.json b/linux-gnu/gnome-extensions/.local/share/gnome-shell/extensions/hide_clock@grantmcwilliams.com/hide_clock@grantmcwilliams.com/metadata.json new file mode 100644 index 0000000..72cd187 --- /dev/null +++ b/linux-gnu/gnome-extensions/.local/share/gnome-shell/extensions/hide_clock@grantmcwilliams.com/hide_clock@grantmcwilliams.com/metadata.json @@ -0,0 +1,16 @@ +{ + "_generated": "Generated by SweetTooth, do not edit", + "description": "Hides Clock", + "name": "Hide Clock", + "shell-version": [ + "3.30", + "3.38", + "40", + "41", + "42", + "43" + ], + "url": "https://github.com/grantmcwilliams/Gnome_Hide_Clock", + "uuid": "hide_clock@grantmcwilliams.com", + "version": 10 +} \ No newline at end of file