aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakobst1n <jakob.stendahl@outlook.com>2024-09-19 10:01:54 +0200
committerjakobst1n <jakob.stendahl@outlook.com>2024-09-19 10:01:54 +0200
commite51ac2890e5196bdb7956a2665437b659eed8812 (patch)
tree1ca22ace55d542d63eadead720a4fbf8ecfe09b9
parentba3a4ea25b451c10cd372b81c9168ce038f69d1c (diff)
downloaddotfiles-testbranch.tar.gz
dotfiles-testbranch.zip
Do a bunch of random thingstestbranch
-rw-r--r--Common/nvim/colors/bw.vim3
-rwxr-xr-xCommon/nvim/lua/basic.lua1
-rwxr-xr-xCommon/nvim/lua/helper_functions.lua10
-rw-r--r--Common/nvim/lua/lsp-conf.lua1
-rwxr-xr-xCommon/nvim/lua/plugins.lua16
-rw-r--r--Makefile.m47
-rw-r--r--auto_completion/cd-archive43
-rw-r--r--linux/inputrc2
8 files changed, 59 insertions, 24 deletions
diff --git a/Common/nvim/colors/bw.vim b/Common/nvim/colors/bw.vim
index f148bbf..076343c 100644
--- a/Common/nvim/colors/bw.vim
+++ b/Common/nvim/colors/bw.vim
@@ -76,6 +76,9 @@ hi link Substitute Search
hi CurSearch ctermbg=11 guibg=DarkYellow guifg=Black ctermfg=Black
hi IncSearch cterm=reverse gui=reverse
+hi LspReferenceText ctermfg=Blue guifg=Blue
+hi LspReferenceRead ctermfg=Blue guifg=Blue
+hi LspReferenceWrite ctermfg=Brown guifg=Brown
function! SetTheme()
if &background == 'dark'
diff --git a/Common/nvim/lua/basic.lua b/Common/nvim/lua/basic.lua
index 7bee1ba..47a7ab6 100755
--- a/Common/nvim/lua/basic.lua
+++ b/Common/nvim/lua/basic.lua
@@ -6,6 +6,7 @@ vim.opt.smartcase = true
vim.opt.showmatch = true
vim.opt.swapfile = false
vim.opt.smartindent = true
+vim.opt.mouse = ""
-- Default to the "modern normal"
vim.opt.expandtab = true
diff --git a/Common/nvim/lua/helper_functions.lua b/Common/nvim/lua/helper_functions.lua
index 9d5a80e..15db30a 100755
--- a/Common/nvim/lua/helper_functions.lua
+++ b/Common/nvim/lua/helper_functions.lua
@@ -251,3 +251,13 @@ vim.api.nvim_create_user_command("InsertDateTime", insert_date_time, {})
-- Reminders for system clipboard register
vim.api.nvim_set_keymap('v', '<leader>y', [[:lua vim.api.nvim_echo({{"Use register '+' for system clipboard", "ErrorMsg"}}, false, {})<CR>]], {noremap = true, silent=false})
vim.api.nvim_set_keymap('n', '<leader>y', [[:lua vim.api.nvim_echo({{"Use register '+' for system clipboard", "ErrorMsg"}}, false, {})<CR>]], {noremap = true, silent=false})
+
+
+vim.cmd [[
+augroup highlight_current_word
+ autocmd!
+ autocmd CursorHold * lua vim.lsp.buf.document_highlight()
+ autocmd CursorHoldI * lua vim.lsp.buf.document_highlight()
+ autocmd CursorMoved * lua vim.lsp.buf.clear_references()
+augroup END
+]]
diff --git a/Common/nvim/lua/lsp-conf.lua b/Common/nvim/lua/lsp-conf.lua
index 2c7463b..9025244 100644
--- a/Common/nvim/lua/lsp-conf.lua
+++ b/Common/nvim/lua/lsp-conf.lua
@@ -74,6 +74,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts)
+ vim.keymap.set('i', '<C-k>', vim.lsp.buf.signature_help, opts)
vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, opts)
vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, opts)
vim.keymap.set('n', '<leader>wl', function()
diff --git a/Common/nvim/lua/plugins.lua b/Common/nvim/lua/plugins.lua
index 829ca15..2ad775f 100755
--- a/Common/nvim/lua/plugins.lua
+++ b/Common/nvim/lua/plugins.lua
@@ -57,22 +57,6 @@ return require('packer').startup(function(use)
'neovim/nvim-lspconfig' ,
}
- -- Treesitter, quicker highlighting and such
- use {
- "nvim-treesitter/nvim-treesitter",
- config = function()
- require'nvim-treesitter.configs'.setup {
- ensure_installed = { "c", "cpp", "python", "php", "java", "lua", "vim", "vimdoc", "query", "php", "sql" },
- sync_install = false,
- auto_install = true,
- highlight = {
- enable = false,
- },
- --ignore_install = { "javascript" },
- }
- end
- }
-
-- vim-dadbob (run sql directly)
use {
'tpope/vim-dadbod',
diff --git a/Makefile.m4 b/Makefile.m4
index 1fd7dc4..e3aa34b 100644
--- a/Makefile.m4
+++ b/Makefile.m4
@@ -219,9 +219,6 @@ m4_ifelse(DT_TLP, `yes', `tlp',) m4_dnl
m4_dnl
m4_ifelse(DT_SWAY, `yes', `sway swayidle physlock blueman network-manager-gnome wob wlogout wofi brightnessctl clipman xwayland seahorse fcitx5',) m4_dnl
m4_dnl
-m4_ifelse(DT_QTILE, `yes', `python3-cffi python3-cairocffi pango pango-devel python3-dbus-next',) m4_dnl qtile core
-m4_ifelse(DT_QTILE, `yes', `python3_xcffib xsecurelock',) m4_dnl qtile x11
-m4_ifelse(DT_QTILE, `yes', `wlroots python3-wlroots python3-pywayland python3-xkbcommon xwayland',) m4_dnl qtile wayland
install_packages:
@@ -283,13 +280,13 @@ m4_ifelse(DT_QTILE, `yes', `qtile qtile_extras',) m4_dnl qtile core
install_pip_packages:
@missing_packages=""; \
for pkg in $(PIP_DEPENDENCIES); do \
- if [ "$($PIP list | grep -sw "$$pkg" | wc -l)" = "0" ]; then \
+ if [ "$(pip list | grep -sw "$$pkg" | wc -l)" = "0" ]; then \
missing_packages="$$missing_packages $$pkg"; \
fi; \
done; \
if [ -n "$$missing_packages" ]; then \
echo "Installing missing packages: $$missing_packages"; \
- sudo $PIP $PIP_FLAGS install $$missing_packages; \
+ sudo pip $PIP_FLAGS install $$missing_packages; \
fi
# Global rust packages
diff --git a/auto_completion/cd-archive b/auto_completion/cd-archive
index 9540362..8c4122c 100644
--- a/auto_completion/cd-archive
+++ b/auto_completion/cd-archive
@@ -1,11 +1,50 @@
#!/bin/bash
-ARCHIVE="${HOME}/Nextcloud"
+#set -x
+ARCHIVE="${HOME}/_library"
comp() {
find "${ARCHIVE}" -maxdepth $2 -type d -regextype posix-extended -regex "$1"
}
_cda() {
+ local cur prev opts
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+
+ # Format directory names for completion
+ local formatted_dirs
+ while IFS= read -r dir; do
+ local dir_name=$(basename "$dir")
+ local dir_code="${dir_name%%-*}"
+ local dir_desc="${dir_name#*-}"
+ formatted_dirs+="${dir_code} ${dir_desc}"$'\n'
+ done <<< "$directories"
+
+ # Generate completions based on current input
+ COMPREPLY=($(compgen -W "$formatted_dirs" -- "$cur"))
+}
+
+# Autocomplete function
+_cda() {
+ local current="${COMP_WORDS[COMP_CWORD]}"
+ local target_dir="$HOME/_library"
+ local suggestions=()
+
+ # Collect directories and format them
+ while IFS= read -r dir; do
+ local base_dir=$(basename "$dir")
+ # Append directory code and description
+ suggestions+=("${base_dir%%-*} ${base_dir#*-}")
+ done < <(find "$target_dir" -maxdepth 3 -type d -name "[0-9]*-*")
+
+ # Generate completions matching current input
+ COMPREPLY=($(compgen -W "${suggestions[*]}" -- "$current"))
+}
+
+#complete -F _cda cda
+
+_cda2() {
if [ ! -z "$2" ]; then
local cur
COMPREPLY=()
@@ -13,6 +52,7 @@ _cda() {
if [ "${#2}" = "1" ]; then
D1=$(comp "${ARCHIVE}/[0-9]-.*" 1)
+ echo "$D1"
target=$(printf "${D1}" | grep "$2" | xargs basename)
elif [ "${#2}" = "3" ]; then
D2=$(comp "${ARCHIVE}/[0-9]+-[^/]+/[0-9]{3}-.*" 2)
@@ -29,4 +69,3 @@ _cda() {
fi
}
-complete -F _cda cda
diff --git a/linux/inputrc b/linux/inputrc
index 5a6775e..3623cc1 100644
--- a/linux/inputrc
+++ b/linux/inputrc
@@ -1,3 +1,3 @@
set colored-stats on
set editing-mode vi
-set keymap vi
+#set keymap vi