From c87c465e5fe4df043e4ae0a9bc86ef95025326e1 Mon Sep 17 00:00:00 2001 From: Daan Vanoverloop Date: Thu, 21 Oct 2021 08:42:46 +0200 Subject: [PATCH] Changes --- .config/nvim/lua/completion.lua | 25 ++++++++++++++++++++++++- .config/sway/config | 20 ++++++++++++++++++-- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/.config/nvim/lua/completion.lua b/.config/nvim/lua/completion.lua index 012f1e4..909ea57 100644 --- a/.config/nvim/lua/completion.lua +++ b/.config/nvim/lua/completion.lua @@ -51,6 +51,12 @@ lspconfig['rust_analyzer'].setup({ } }) +--[[ +require'lspconfig'.java_language_server.setup{ + cmd = {'java-language-server'} +} +--]] + -- Exrta features vim.cmd([[autocmd BufEnter,BufWinEnter,TabEnter *.rs :lua require'lsp_extensions'.inlay_hints{}]]) require('lspkind').init{} @@ -59,6 +65,23 @@ require "lsp_signature".setup() -- luasnip setup local luasnip = require 'luasnip' +-- java +local root_markers = {'gradlew', 'pom.xml', 'build.xml'} +local root_dir = require('jdtls.setup').find_root(root_markers) +local home = os.getenv('HOME') +local workspace_folder = home .. "/.workspace" .. vim.fn.fnamemodify(root_dir, ":p:h:t") + +--[[ +local config = { + cmd = {'jdtls', '-data', workspace_folder}, + + -- This is the default if not provided, you can remove it. Or adjust as needed. + -- One dedicated LSP server & client will be started per unique root_dir + root_dir = root_dir +} +require('jdtls').start_or_attach(config) +--]] + -- nvim-cmp setup local cmp = require 'cmp' cmp.setup { @@ -75,7 +98,7 @@ cmp.setup { [''] = cmp.mapping.complete(), [''] = cmp.mapping.close(), [''] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Replace, + behavior = cmp.ConfirmBehavior.Insert, select = true, }, [''] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 's' }), diff --git a/.config/sway/config b/.config/sway/config index 52ff13f..337b83d 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -74,8 +74,6 @@ exec_always --no-startup-id ~/.config/sway/lisgd_gestures.sh bindsym $mod+Shift+e exec --no-startup-id ~/.config/sway/exit.sh -bindsym $mod+c exec --no-startup-id rofi-pass-wl - bindsym $mod+Shift+g exec --no-startup-id dmenu_script game.sh bindsym $mod+c exec --no-startup-id rofi-pass-wl @@ -101,6 +99,8 @@ bindsym $mod+Shift+q kill # start rofi bindsym $mod+d exec rofi -show drun --no-startup-id +bindsym $mod+s exec grimshot copy area + # workspaces # change focus bindsym $mod+h focus left @@ -230,6 +230,8 @@ input type:touchpad { natural_scroll enabled } +exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway + # Workspace assignment assign [class="^code-oss$"] 3 @@ -238,6 +240,20 @@ for_window [class="^code-oss$"] focus assign [window_role="browser"] 2 for_window [window_role="browser"] focus +# Floaing + +for_window [window_role="pop-up"] floating enable +for_window [window_role="bubble"] floating enable +for_window [window_role="task_dialog"] floating enable +for_window [window_role="Preferences"] floating enable +for_window [window_type="dialog"] floating enable +for_window [window_type="menu"] floating enable +for_window [window_role="About"] floating enable +for_window [class="xdg-desktop-portal-kde"] floating enable +for_window [class="ksysguard"] floating enable +for_window [class="ksysguard"] sticky enable +for_window [title="\ -\ Sharing\ Indicator$"] floating enable, sticky enable + ## Plasma Integration # Try to kill the wallpaper set by Plasma (it takes up the entire workspace and hides everythiing) exec --no-startup-id wmctrl -c Plasma