diff --git a/git/gitconfig b/git/gitconfig index a700c63..4d4f8a2 100644 --- a/git/gitconfig +++ b/git/gitconfig @@ -32,3 +32,5 @@ [http] postBuffer = 3221225472 +[credential] + helper = libsecret diff --git a/install.sh b/install.sh index ccd96c7..6b8e585 100755 --- a/install.sh +++ b/install.sh @@ -110,5 +110,9 @@ sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug. https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' workspace_backup .config/nvim/init.vim workspace_link nvim/init.vim .config/nvim/init.vim -workspace_backup .config/nvim/coc-settings.json -workspace_link nvim/coc-settings.json .config/nvim/coc-settings.json + +for file in nvim/lua/* +do + workspace_backup .config/nvim/lua/$(basename $file) + workspace_link nvim/lua/$(basename $file) .config/nvim/lua/$(basename $file) +done diff --git a/nvim/coc-settings.json b/nvim/coc-settings.json deleted file mode 100644 index 601d9c0..0000000 --- a/nvim/coc-settings.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "git.addedSign.hlGroup": "GitGutterAdd", - "git.changedSign.hlGroup": "GitGutterChange", - "git.removedSign.hlGroup": "GitGutterDelete", - "git.topRemovedSign.hlGroup": "GitGutterDelete", - "git.changeRemovedSign.hlGroup": "GitGutterChangeDelete", - "git.addGBlameToVirtualText": true, - "languageserver": { - "terraform": { - "command": "terraform-ls", - "args": ["serve"], - "filetypes": ["terraform", "tf"], - "initializationOptions": {}, - "settings": {} - }, - "graphql": { - "command": "graphql-lsp", - "args": ["server", "-m", "stream"], - // customize filetypes to your needs - "filetypes": ["typescript", "typescriptreact", "graphql"] - } - }, - "coc.preferences.formatOnSaveFiletypes": [ - "javascript", - "javascriptreact", - "typescript", - "typescriptreact", - "json", - "graphql", - "prisma", - "terraform", - "jsonc", - "rust" - ], - "tsserver.useLocalTsdk": true, - "coc.preferences.formatOnType": true, - "yaml.schemaStore.enable": true, - "yaml.schemas": { - "kubernetes": ["/**/kubernetes/**/*.yaml", "/**/k8s/**/*.yaml"], - "https://json.schemastore.org/github-workflow.json": "/.github/workflows/*.yaml" - } -} diff --git a/nvim/init.vim b/nvim/init.vim index aed40c0..95fea61 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -8,6 +8,8 @@ autocmd VimEnter * "--- Plugins call plug#begin() +" Dependencies by multiple plugins +Plug 'nvim-lua/plenary.nvim' " General Plug 'ojroques/vim-oscyank' Plug 'tpope/vim-obsession' @@ -18,6 +20,7 @@ Plug 'sainnhe/edge' Plug 'Yggdroot/indentLine' Plug 'koenverburg/peepsight.nvim' Plug 'norcalli/nvim-colorizer.lua' +Plug 'j-hui/fidget.nvim' " Git Plug 'airblade/vim-gitgutter' " Search/Files @@ -27,76 +30,26 @@ Plug 'ANGkeith/telescope-terraform-doc.nvim' Plug 'fannheyward/telescope-coc.nvim' " Ignore/Edit files Plug 'vim-scripts/gitignore' +" Languages +Plug 'NoahTheDuke/vim-just' " Coding helpers +Plug 'zbirenbaum/copilot.lua' +Plug 'zbirenbaum/copilot-cmp' +Plug 'Exafunction/codeium.nvim' +Plug 'petertriho/cmp-git' Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} -Plug 'neoclide/coc.nvim', {'branch': 'release'} -Plug 'github/copilot.vim' +Plug 'williamboman/mason.nvim' +Plug 'williamboman/mason-lspconfig.nvim' +Plug 'neovim/nvim-lspconfig' +Plug 'mhartington/formatter.nvim' +Plug 'hrsh7th/cmp-nvim-lsp' +Plug 'hrsh7th/cmp-cmdline' +Plug 'hrsh7th/cmp-buffer' +Plug 'hrsh7th/cmp-path' +Plug 'hrsh7th/nvim-cmp' call plug#end() -""""" -"--- CodeServer Configurations -let g:coc_global_extensions = [ - \ 'coc-tsserver', - \ 'coc-prettier', - \ 'coc-yaml', - \ 'coc-json', - \ 'coc-git', - \ 'coc-pyright', - \ 'coc-pairs', - \ 'coc-prisma', - \ 'coc-sh', - \ 'coc-typos', - \ 'coc-docker', - \ 'coc-go', - \ 'coc-html', - \ 'coc-sql', - \ 'coc-toml', - \ 'coc-rust-analyzer', - \ ] -if isdirectory('./node_modules') && isdirectory('./node_modules/prettier') - let g:coc_global_extensions += ['coc-prettier'] -endif -if isdirectory('./node_modules') && isdirectory('./node_modules/eslint') - let g:coc_global_extensions += ['coc-eslint'] -endif - -" 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()\" - -" Find symbol of current document. -nnoremap o :CocList outline -" Diagnostic list -nnoremap d :CocList diagnostics -" Symbols list -nnoremap s :CocList -I symbols -" Code actions -nmap do (coc-codeaction) -" Rename current world -nmap rn (coc-rename) -" 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') -" Remap keys for applying codeAction to the current buffer. -nmap ac (coc-codeaction) -" Apply AutoFix to problem on the current line. -nmap qf (coc-fix-current) -" GoTo code navigation. -nmap gd (coc-definition) -nmap gy (coc-type-definition) -nmap gi (coc-implementation) -nmap gr (coc-references) - """"" "--- TMUX/Clipboard fixes set t_Co=256 @@ -124,94 +77,19 @@ if exists('##TextYankPost') augroup END endif -"""" -"--- Treesitter configuration -lua <