This commit is contained in:
Daan Vanoverloop 2021-10-21 08:42:46 +02:00
parent a3ffda6610
commit c87c465e5f
Signed by: Danacus
GPG Key ID: F2272B50E129FC5C
2 changed files with 42 additions and 3 deletions

View File

@ -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 {
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.close(),
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
behavior = cmp.ConfirmBehavior.Insert,
select = true,
},
['<Tab>'] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 's' }),

View File

@ -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