From f8703fba6d27499d5274e2c8f112ccb7803fb5fb Mon Sep 17 00:00:00 2001 From: Tine Jozelj Date: Tue, 31 May 2022 09:04:14 +0200 Subject: [PATCH] fix(nvim): coc settings and ctrl-p search --- bin/.bin | 1 + git/gitconfig | 9 +++++++++ install.sh | 2 ++ nvim/coc-settings.json | 37 +++++++++++++++++++++++++++++++++++++ nvim/init.vim | 1 + zsh/zshrc | 2 ++ 6 files changed, 52 insertions(+) create mode 120000 bin/.bin create mode 100644 nvim/coc-settings.json diff --git a/bin/.bin b/bin/.bin new file mode 120000 index 0000000..52f7c69 --- /dev/null +++ b/bin/.bin @@ -0,0 +1 @@ +/home/tine/projects/workspace/bin \ No newline at end of file diff --git a/git/gitconfig b/git/gitconfig index 68fdfb5..9f62a64 100644 --- a/git/gitconfig +++ b/git/gitconfig @@ -17,3 +17,12 @@ [diff] external = difft + +[url "https://mentos1386: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@github.com/Bird-Buddy/terraform"] + insteadOf = https://github.com/Bird-Buddy/terraform + +[url "https://mentos1386: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@github.com/Bird-Buddy/terraform"] + insteadOf = https://github.com/Bird-Buddy/terraform + +[pull] + ff = only diff --git a/install.sh b/install.sh index 64e19cf..0c0caec 100755 --- a/install.sh +++ b/install.sh @@ -90,3 +90,5 @@ 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 diff --git a/nvim/coc-settings.json b/nvim/coc-settings.json new file mode 100644 index 0000000..fabc7bf --- /dev/null +++ b/nvim/coc-settings.json @@ -0,0 +1,37 @@ +{ + "git.addedSign.hlGroup": "GitGutterAdd", + "git.changedSign.hlGroup": "GitGutterChange", + "git.removedSign.hlGroup": "GitGutterDelete", + "git.topRemovedSign.hlGroup": "GitGutterDelete", + "git.changeRemovedSign.hlGroup": "GitGutterChangeDelete", + "languageserver": { + "terraform": { + "command": "terraform-ls", + "args": ["serve"], + "filetypes": ["terraform", "tf"], + "initializationOptions": {}, + "settings": {} + } + }, + "prettier.disableSuccessMessage": true, + "coc.preferences.formatOnSaveFiletypes": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "json", + "graphql", + "prisma", + "terraform" + ], + "tsserver.formatOnType": 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 38da17c..aa12b76 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -211,6 +211,7 @@ nnoremap let mapleader = " " " Telescope +nnoremap Telescope find_files nnoremap ff Telescope find_files nnoremap fg Telescope live_grep " Telescope git diff --git a/zsh/zshrc b/zsh/zshrc index 86cdafe..9b6fcf7 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -45,6 +45,8 @@ bindkey -M vicmd "/" history-incremental-search-forward alias gicm="git checkout main && git pull" alias gic="git checkout" +alias vim="nvim" + # PATH export PATH=$PATH:$HOME/.bin:$HOME/go/bin