aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakobst1n <jakob.stendahl@outlook.com>2024-04-03 22:32:11 +0200
committerjakobst1n <jakob.stendahl@outlook.com>2024-04-03 22:32:11 +0200
commitb9f486ba609ae7313283f75cf7161c974d67ce30 (patch)
treea114c4a1f5dd45ae5fc620fac202322533a4e11d
parent8f2d629d2d23efa2ce1748d6f1daaf621617d2c7 (diff)
downloaddotfiles-b9f486ba609ae7313283f75cf7161c974d67ce30.tar.gz
dotfiles-b9f486ba609ae7313283f75cf7161c974d67ce30.zip
Tweak
-rwxr-xr-xCommon/nvim/lua/basic.lua9
-rw-r--r--Common/nvim/lua/lsp-conf.lua21
-rw-r--r--linux/tmux.conf.m42
3 files changed, 5 insertions, 27 deletions
diff --git a/Common/nvim/lua/basic.lua b/Common/nvim/lua/basic.lua
index 18128e1..0d8b3f9 100755
--- a/Common/nvim/lua/basic.lua
+++ b/Common/nvim/lua/basic.lua
@@ -14,9 +14,6 @@ vim.opt.autoread = true
--vim.opt.mapleader = ","
vim.g.mapleader = ","
--- Fast saving
-map('n', '<leader>w', ':w!<cr>', silentnoremap)
-
-- Convenient sudo saving of file
vim.api.nvim_create_user_command(
'W', 'w !sudo tee % > /dev/null',
@@ -183,12 +180,6 @@ map('v', '<leader>P', '"+P', noremap)
map('n', '<leader>p', '"+p', noremap)
map('n', '<leader>P', '"+P', noremap)
--- Delete trailing whitespace on save
---vim.api.nvim_create_autocmd("BufWritePre", {
--- pattern = { "*" },
--- command = [[%s/\s\+$//e]]
---})
-
--[[
Misc
--]]
diff --git a/Common/nvim/lua/lsp-conf.lua b/Common/nvim/lua/lsp-conf.lua
index 7709c83..b80706d 100644
--- a/Common/nvim/lua/lsp-conf.lua
+++ b/Common/nvim/lua/lsp-conf.lua
@@ -50,31 +50,18 @@ vim.diagnostic.config({
},
})
+
vim.cmd([[
set signcolumn=yes
-autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false })
]])
+-- autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false })
+map("n", "<leader>d", ":lua vim.diagnostic.open_float(nil, {})<CR>", silentnoremap)
+
---Set completeopt to have a better completion experience
--- :help completeopt
--- menuone: popup even when there's only one match
--- noinsert: Do not insert text until a selection is made
--- noselect: Do not select, force to select one from the menu
--- shortness: avoid showing extra messages when using completion
--- updatetime: set updatetime for CursorHold
vim.opt.completeopt = {'menuone', 'noselect', 'noinsert'}
vim.opt.shortmess = vim.opt.shortmess + { c = true}
vim.api.nvim_set_option('updatetime', 300)
--- Fixed column for diagnostics to appear
--- Show autodiagnostic popup on cursor hover_range
--- Goto previous / next diagnostic warning / error
--- Show inlay_hints more frequently
-vim.cmd([[
-set signcolumn=yes
-autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false })
-]])
-
-- Completion Plugin Setup
local cmp = require'cmp'
diff --git a/linux/tmux.conf.m4 b/linux/tmux.conf.m4
index 7b5b54f..63de4ae 100644
--- a/linux/tmux.conf.m4
+++ b/linux/tmux.conf.m4
@@ -91,7 +91,7 @@ bind -n M-w display-popup -E "nvim -c VimwikiIndex -c Calendar -c 'wincmd p'"
bind -n M-C-w display-popup -E "nvim -c VimwikiMakeDiaryNote -c Calendar -c 'wincmd p' -c 'call append(1, strftime(\"- **%T** - **\"))' -c 'call append(2, \"\")' -c 'execute \"normal! 2GA\"'"
bind -n M-C-i display-popup -E "nvim -c 'e ~/Nextcloud/wiki/I45/Hendelser.md' -c 'call append(1, strftime(\"- **%d.%m.%Y (%T)** - **\"))' -c 'call append(2, \"\")' -c 'execute \"normal! 2GA\"'"
-bind -n T run-shell "toggle-theme"
+bind-key T run-shell "toggle-theme"
# -- Theme --------------------------------------------------------------------
m4_ifelse(DT_DOTFILES_TYPE, `local', `m4_dnl