diff --git a/.gitignore b/.gitignore index 396f466..2ccebbe 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ logs/* **/wslu **/TabNine **/firebase +**/pypoetry # pytest **/__pycache__ diff --git a/files/.bash_profile b/files/.bash_profile index 0a45628..4bfc7d0 100644 --- a/files/.bash_profile +++ b/files/.bash_profile @@ -8,3 +8,4 @@ # References: # https://unix.stackexchange.com/questions/192521/loading-profile-from-bash-profile-or-not-using-bash-profile-at-all # https://www.stefaanlippens.net/my_bashrc_aliases_profile_and_other_stuff/ +if [ -e /home/andrejus/.nix-profile/etc/profile.d/nix.sh ]; then . /home/andrejus/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer diff --git a/files/.config/nvim/base.vim b/files/.config/nvim/base.vim index 379fcfe..3f1f5fe 100644 --- a/files/.config/nvim/base.vim +++ b/files/.config/nvim/base.vim @@ -41,8 +41,22 @@ set nowrap " two lines for command line set cmdheight=2 +" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable +" delays and poor user experience. set updatetime=300 +" Don't pass messages to |ins-completion-menu|. +set shortmess+=c + +" Always show the signcolumn, otherwise it would shift the text each time +" diagnostics appear/become resolved. +if has("patch-8.1.1564") + " Recently vim can merge signcolumn and number column into one + set signcolumn=number +else + set signcolumn=yes +endif + " ============================================================================ " " === UI === " " ============================================================================ " diff --git a/files/.config/nvim/coc-settings.json b/files/.config/nvim/coc-settings.json index b090e57..5c361dd 100644 --- a/files/.config/nvim/coc-settings.json +++ b/files/.config/nvim/coc-settings.json @@ -1,9 +1,15 @@ { + "suggest.echodocSupport": true, + "python.jediEnabled": false, + "python.linting.pylintEnabled": false, + "python.linting.flake8Enabled": true, "languageserver": { "terraform": { - "command": "terraform-lsp", + "command": "terraform-ls", + "args": ["serve"], "filetypes": ["tf", "terraform"], - "initializationOptions": {} + "initializationOptions": {}, + "settings": {} } } } diff --git a/files/.config/nvim/mappings.vim b/files/.config/nvim/mappings.vim index 156a5b9..821c721 100644 --- a/files/.config/nvim/mappings.vim +++ b/files/.config/nvim/mappings.vim @@ -85,6 +85,7 @@ inoremap \ pumvisible() ? "\" : \ check_back_space() ? "\" : \ coc#refresh() +inoremap pumvisible() ? "\" : "\" function! s:check_back_space() abort let col = col('.') - 1 diff --git a/install/34-terraform.sh b/install/34-terraform.sh index 74ac7ab..cd4433b 100755 --- a/install/34-terraform.sh +++ b/install/34-terraform.sh @@ -1,11 +1,13 @@ #!/usr/bin/env bash source "$(dirname $0)/utils.sh" +tf_version="0.13.5" if not_installed "terraform"; then echo "Installing terraform..." - wget https://releases.hashicorp.com/terraform/0.12.24/terraform_0.12.24_linux_amd64.zip - unzip terraform_0.12.24_linux_amd64.zip -d "$dotfiles_dir/tmp" - rm terraform_0.12.24_linux_amd64.zip + tf_archive="terraform_${tf_version}_linux_amd64.zip" + wget "https://releases.hashicorp.com/terraform/${tf_version}/${tf_archive}" + unzip "$tf_archive" -d "$dotfiles_dir/tmp" + rm "$tf_archive" mkdir -p ~/.local/bin mv "$dotfiles_dir/tmp/terraform" ~/.local/bin rm "$dotfiles_dir/tmp/terraform" @@ -14,12 +16,16 @@ fi echo "terraform is installed" terraform --version -if not_installed "terraform-lsp"; then - echo "Installing terraform-lsp..." - wget https://github.com/juliosueiras/terraform-lsp/releases/download/v0.0.11-beta2/terraform-lsp_0.0.11-beta2_linux_amd64.tar.gz - tar -C "$dotfiles_dir/tmp" -xzf terraform-lsp_0.0.11-beta2_linux_amd64.tar.gz - rm terraform-lsp_0.0.11-beta2_linux_amd64.tar.gz - mv "$dotfiles_dir/tmp/terraform-lsp" ~/.local/bin +tf_lsp_version="0.8.0" +if not_installed "terraform-ls"; then + echo "Installing terraform-ls..." + tf_lsp_archive="terraform-ls_${tf_lsp_version}_linux_amd64.zip" + wget "https://releases.hashicorp.com/terraform-ls/${tf_lsp_version}/${tf_lsp_archive}" + unzip "${tf_lsp_archive}" -d "$dotfiles_dir/tmp" + rm "${tf_lsp_archive}" + mkdir -p ~/.local/bin + mv "$dotfiles_dir/tmp/terraform-ls" ~/.local/bin + rm "$dotfiles_dir/tmp/terraform-ls" fi echo "terraform-lsp is installed"