From 1821340f033ef236c72c228899f8ea5041f82bdb Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Wed, 18 Aug 2021 21:20:20 +0300 Subject: [PATCH] Nvim: improvements to syntax highlighting and add a couple of plugins --- config.yaml | 8 ++----- .../nvim/lua/pluginconf/treesitter.lua | 3 ++- home/.config/nvim/lua/pluginmanager.lua | 22 ++++++++++++------- home/.config/nvim/lua/settings.lua | 2 +- home/.config/nvim/scripts/java-lsp.sh | 17 -------------- home/.config/sway/conf.d/01-vars.conf | 2 +- home/.config/sway/conf.d/02-bar.conf | 2 +- home/.config/sway/conf.d/03-input.conf | 2 +- home/.config/sway/conf.d/04-output.conf | 2 +- home/.config/sway/conf.d/05-workspaces.conf | 2 +- home/.config/sway/conf.d/06-keybinds.conf | 2 +- home/.config/sway/conf.d/07-appearance.conf | 2 +- home/.config/sway/conf.d/08-exec.conf | 2 +- 13 files changed, 27 insertions(+), 41 deletions(-) delete mode 100755 home/.config/nvim/scripts/java-lsp.sh diff --git a/config.yaml b/config.yaml index 6cecc98..40f704e 100644 --- a/config.yaml +++ b/config.yaml @@ -1,5 +1,5 @@ actions: - nvim-packer-install: nvim +PackerInstall + nvim-packer-sync: nvim +PackerSync config: backup: true banner: true @@ -30,12 +30,9 @@ dotfiles: src: .config/nvim/init.lua d_nvim_lua: actions: - - nvim-packer-install + - nvim-packer-sync dst: ~/.config/nvim/lua src: .config/nvim/lua - d_nvim_scripts: - dst: ~/.config/nvim/scripts - src: .config/nvim/scripts f_user-dirs.dirs: dst: ~/.config/user-dirs.dirs src: .config/user-dirs.dirs @@ -194,7 +191,6 @@ profiles: - f_ssh.conf - f_authorized_keys - d_nvim_lua - - d_nvim_scripts - f_nvim_init - f_gitconfig - f_alacritty.yml diff --git a/home/.config/nvim/lua/pluginconf/treesitter.lua b/home/.config/nvim/lua/pluginconf/treesitter.lua index 12ab42b..939303e 100644 --- a/home/.config/nvim/lua/pluginconf/treesitter.lua +++ b/home/.config/nvim/lua/pluginconf/treesitter.lua @@ -2,5 +2,6 @@ require'nvim-treesitter.configs'.setup { ensure_installed = 'maintained', highlight = {enable = true}, indent = {enable = true}, - incremental_selection = {enable = true} + incremental_selection = {enable = true}, + context_commentstring = {enable = true} } diff --git a/home/.config/nvim/lua/pluginmanager.lua b/home/.config/nvim/lua/pluginmanager.lua index 05a37b1..fc91530 100644 --- a/home/.config/nvim/lua/pluginmanager.lua +++ b/home/.config/nvim/lua/pluginmanager.lua @@ -20,7 +20,7 @@ require('packer').startup(function() use {'wbthomason/packer.nvim', opt = true} -- Colorscheme - use 'monsonjeremy/onedark.nvim' + use 'EdenEast/nightfox.nvim' -- Git in signcolumn use 'airblade/vim-gitgutter' @@ -41,7 +41,7 @@ require('packer').startup(function() use 'tpope/vim-fugitive' -- Indent characters - --use "lukas-reineke/indent-blankline.nvim" + -- use "lukas-reineke/indent-blankline.nvim" -- Tree explorer use {'kyazdani42/nvim-tree.lua', requires = 'kyazdani42/nvim-web-devicons'} @@ -64,9 +64,6 @@ require('packer').startup(function() -- Install LSP executables use 'kabouzeid/nvim-lspinstall' - -- Extensions for eclipse.jdt.ls - use 'mfussenegger/nvim-jdtls' - -- Completion framework use 'nvim-lua/completion-nvim' @@ -77,9 +74,18 @@ require('packer').startup(function() run = ':TSUpdate' } - -- Syntax highlighting for languages - -- that are not supported by treesitter - use 'sheerun/vim-polyglot' + -- treesitter plugin for commentstring + use 'JoosepAlviste/nvim-ts-context-commentstring' + + -- Additional plugins for formats not supported + -- by treesitter + use 'jamespeapen/swayconfig.vim' + + -- mappings for commenting in code + use 'tpope/vim-commentary' + + -- we all know this one + use 'tpope/vim-surround' -- Formatter plugin use 'sbdchd/neoformat' diff --git a/home/.config/nvim/lua/settings.lua b/home/.config/nvim/lua/settings.lua index 42ee769..22848b9 100644 --- a/home/.config/nvim/lua/settings.lua +++ b/home/.config/nvim/lua/settings.lua @@ -5,7 +5,7 @@ local cmd = vim.cmd ------ Appearance ------ -- Set colorscheme -require('onedark').setup() +require('nightfox').set() -- True colors o.termguicolors = true diff --git a/home/.config/nvim/scripts/java-lsp.sh b/home/.config/nvim/scripts/java-lsp.sh deleted file mode 100755 index 876383a..0000000 --- a/home/.config/nvim/scripts/java-lsp.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -JAR="$HOME/.local/share/nvim/lspinstall/java/plugins/org.eclipse.equinox.launcher_*.jar" -GRADLE_HOME=$HOME/gradle /usr/lib/jvm/default/bin/java \ - -Declipse.application=org.eclipse.jdt.ls.core.id1 \ - -Dosgi.bundles.defaultStartLevel=4 \ - -Declipse.product=org.eclipse.jdt.ls.core.product \ - -Dlog.protocol=true \ - -Dlog.level=ALL \ - -Xms1g \ - -Xmx2G \ - -jar $(echo "$JAR") \ - -configuration "$HOME/.local/share/nvim/lspinstall/java/config_linux" \ - -data "${1:-$HOME/workspace}" \ - --add-modules=ALL-SYSTEM \ - --add-opens java.base/java.util=ALL-UNNAMED \ - --add-opens java.base/java.lang=ALL-UNNAMED diff --git a/home/.config/sway/conf.d/01-vars.conf b/home/.config/sway/conf.d/01-vars.conf index 530dd5e..dade25d 100644 --- a/home/.config/sway/conf.d/01-vars.conf +++ b/home/.config/sway/conf.d/01-vars.conf @@ -1,4 +1,4 @@ -# vim:ft=i3config +# vim:ft=swayconfig set $mod Mod4 set $term footclient diff --git a/home/.config/sway/conf.d/02-bar.conf b/home/.config/sway/conf.d/02-bar.conf index 0463000..8027d96 100644 --- a/home/.config/sway/conf.d/02-bar.conf +++ b/home/.config/sway/conf.d/02-bar.conf @@ -1,4 +1,4 @@ -# vim:ft=i3config +# vim:ft=swayconfig bar { swaybar_command waybar diff --git a/home/.config/sway/conf.d/03-input.conf b/home/.config/sway/conf.d/03-input.conf index 1f1a739..aea31fb 100644 --- a/home/.config/sway/conf.d/03-input.conf +++ b/home/.config/sway/conf.d/03-input.conf @@ -1,4 +1,4 @@ -# vim:ft=i3config +# vim:ft=swayconfig input type:keyboard { xkb_layout eu diff --git a/home/.config/sway/conf.d/04-output.conf b/home/.config/sway/conf.d/04-output.conf index 8d701a7..9e524bf 100644 --- a/home/.config/sway/conf.d/04-output.conf +++ b/home/.config/sway/conf.d/04-output.conf @@ -1,4 +1,4 @@ -# vim:ft=i3config +# vim:ft=swayconfig output * bg $wallpaper fill output eDP-1 position 0 0 diff --git a/home/.config/sway/conf.d/05-workspaces.conf b/home/.config/sway/conf.d/05-workspaces.conf index f33cf42..ea67ffe 100644 --- a/home/.config/sway/conf.d/05-workspaces.conf +++ b/home/.config/sway/conf.d/05-workspaces.conf @@ -1,4 +1,4 @@ -# vim:ft=i3config +# vim:ft=swayconfig # Start applications in specific workspaces assign [app_id="telegramdesktop"] workspace 3 diff --git a/home/.config/sway/conf.d/06-keybinds.conf b/home/.config/sway/conf.d/06-keybinds.conf index 4f68b1c..3eed307 100644 --- a/home/.config/sway/conf.d/06-keybinds.conf +++ b/home/.config/sway/conf.d/06-keybinds.conf @@ -1,4 +1,4 @@ -# vim:ft=i3config +# vim:ft=swayconfig # start terminal bindsym $mod+Return exec $term diff --git a/home/.config/sway/conf.d/07-appearance.conf b/home/.config/sway/conf.d/07-appearance.conf index 70dfb11..a558c60 100644 --- a/home/.config/sway/conf.d/07-appearance.conf +++ b/home/.config/sway/conf.d/07-appearance.conf @@ -1,4 +1,4 @@ -# vim:ft=i3config +# vim:ft=swayconfig default_border none gaps inner 15 diff --git a/home/.config/sway/conf.d/08-exec.conf b/home/.config/sway/conf.d/08-exec.conf index adca6ca..d87e72e 100644 --- a/home/.config/sway/conf.d/08-exec.conf +++ b/home/.config/sway/conf.d/08-exec.conf @@ -1,4 +1,4 @@ -# vim:ft=i3config +# vim:ft=swayconfig exec { foot -s