diff --git a/.config/fish/conf.d/virtualfish-loader.fish b/.config/fish/conf.d/virtualfish-loader.fish index 43dc4c0..eee0754 100644 --- a/.config/fish/conf.d/virtualfish-loader.fish +++ b/.config/fish/conf.d/virtualfish-loader.fish @@ -1,12 +1,4 @@ set -g VIRTUALFISH_VERSION 2.5.4 -set -g VIRTUALFISH_PYTHON_EXEC /usr/bin/python3 -if test -e /usr/local/lib/python3.10/site-packages/virtualfish/virtual.fish - source /usr/local/lib/python3.10/site-packages/virtualfish/virtual.fish -else if test -e /usr/local/lib/python3.9/site-packages/virtualfish/virtual.fish - source /usr/local/lib/python3.9/site-packages/virtualfish/virtual.fish -else if test -e /usr/lib/python3.9/site-packages/virtualfish/virtual.fish - source /usr/lib/python3.9/site-packages/virtualfish/virtual.fish -else if test -e /usr/lib/python3.10/site-packages/virtualfish/virtual.fish - source /usr/lib/python3.10/site-packages/virtualfish/virtual.fish -end -emit virtualfish_did_setup_plugins +set -g VIRTUALFISH_PYTHON_EXEC /bin/python +source /usr/lib/python3.10/site-packages/virtualfish/virtual.fish +emit virtualfish_did_setup_plugins \ No newline at end of file diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables index 1b4481a..f1b6a56 100644 --- a/.config/fish/fish_variables +++ b/.config/fish/fish_variables @@ -1,6 +1,6 @@ # This file contains fish universal variable definitions. # VERSION: 3.0 -SETUVAR __fish_initialized:3100 +SETUVAR __fish_initialized:3400 SETUVAR fish_color_autosuggestion:555\x1ebrblack SETUVAR fish_color_cancel:\x2dr SETUVAR fish_color_command:005fd7 @@ -28,3 +28,4 @@ SETUVAR fish_pager_color_completion:\x1d SETUVAR fish_pager_color_description:B3A06D\x1eyellow SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan +SETUVAR fish_pager_color_selected_background:\x2dr diff --git a/.config/k9s/config.yml b/.config/k9s/config.yml index 7f8a196..09a109e 100644 --- a/.config/k9s/config.yml +++ b/.config/k9s/config.yml @@ -19,7 +19,7 @@ k9s: clusters: kubernetes: namespace: - active: "" + active: all favorites: - all - default @@ -43,3 +43,4 @@ k9s: memory: critical: 90 warn: 70 + screenDumpDir: /tmp/k9s-screens-barak diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml index 9ae2397..abe7b1e 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml @@ -38,6 +38,10 @@ + + + + @@ -51,6 +55,10 @@ + + + + @@ -67,6 +75,10 @@ + + + + @@ -80,6 +92,10 @@ + + + + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml index 166d8eb..6dc0558 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml @@ -4,8 +4,8 @@ - - - + + + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml index d062b36..6f340b0 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml @@ -29,6 +29,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml index e205fb5..1d7482c 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml @@ -7,8 +7,11 @@ + + + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml index c6b1ecd..3077199 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml @@ -7,6 +7,7 @@ + @@ -46,21 +47,22 @@ + - - - - - - - - + + + + + - - + + + + + @@ -86,7 +88,10 @@ - + + + + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml index af82713..2950c5c 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml @@ -5,11 +5,11 @@ - + - - + + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml index 246af5d..ac75ee5 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml @@ -3,7 +3,8 @@ - + + @@ -11,14 +12,19 @@ + + + + + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-manager.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-manager.xml index 44e83e0..e3f254f 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-manager.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-manager.xml @@ -2,7 +2,7 @@ - - + + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml index 2bf99b0..d13769e 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml @@ -2,66 +2,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - - + + + @@ -87,5 +88,10 @@ + + + + + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml index 520076d..762e18a 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml @@ -2,7 +2,7 @@ - + @@ -15,7 +15,7 @@ - + @@ -37,11 +37,13 @@ + + - + diff --git a/.tmux.conf b/.tmux.conf index b408322..fa9b85b 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -20,6 +20,7 @@ bind-key C-p previous-window set -g set-titles off set -g mouse on set -g default-terminal tmux-256color +set-option -g default-shell /bin/fish setw -g mode-keys vi new -d @@ -36,6 +37,7 @@ bind - split-window -v bind v split-window -h bind = select-layout even-horizontal +bind-key C-t new-window "ttyd -R -d -t fontSize=18 tmux attach -t `tmux display -p '#S'`" # Status Bar #set -g status-bg black diff --git a/.vim/nvim.lua b/.vim/nvim.lua index bf84138..4cf53a6 100644 --- a/.vim/nvim.lua +++ b/.vim/nvim.lua @@ -26,6 +26,35 @@ nvim_lsp.gopls.setup({ on_attach=on_attach }) nvim_lsp.pyright.setup({ on_attach=on_attach }) nvim_lsp.clangd.setup({ on_attach=on_attach }) +local runtime_path = vim.split(package.path, ';') +table.insert(runtime_path, "lua/?.lua") +table.insert(runtime_path, "lua/?/init.lua") + +require'lspconfig'.sumneko_lua.setup { + settings = { + Lua = { + runtime = { + -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) + version = 'LuaJIT', + -- Setup your lua path + path = runtime_path, + }, + diagnostics = { + -- Get the language server to recognize the `vim` global + globals = {'vim'}, + }, + workspace = { + -- Make the server aware of Neovim runtime files + library = vim.api.nvim_get_runtime_file("", true), + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { + enable = false, + }, + }, + }, +} + function org_imports(wait_ms) local params = vim.lsp.util.make_range_params() @@ -301,7 +330,7 @@ require'nvim-treesitter.configs'.setup { enable = true, -- list of language that will be disabled - disable = { "c", "rust" }, + -- disable = { "c", "rust" }, -- Setting this to true will run `:h syntax` and tree-sitter at the same time. -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). @@ -334,6 +363,13 @@ require'nvim-treesitter.configs'.setup { } } +require"nvim-treesitter.highlight".set_custom_captures { + -- Highlight the @foo.bar capture group with the "Identifier" highlight group. + -- ["foo.bar"] = "Identifier", + ["generic_type_param"] = "TSCGenericTypeParam", +} + +require"neogen".setup {} -- -- Helper functions for my own grepping commands. @@ -411,3 +447,30 @@ function rust_where_at_line() vim.api.nvim_buf_set_lines(0, lineNum-1, lineNum, false, replacements) vim.api.nvim_win_set_cursor(0, {lineNum + 2, 4}) end + +function neogen_dwim() + local table = { + ["function_declaration"] = "func", + ["function_definition"] = "func", + ["function_item"] = "func", + ["function_signature_item"] = "func", + ["struct_item"] = "class", + ["trait_item"] = "class", + ["package_clause"] = "type", + ["const_declaration"] = "type", + ["var_declaration"] = "type", + ["class_definition"] = "class", + } + + local ts_utils = require'nvim-treesitter.ts_utils' + local current_node = ts_utils.get_node_at_cursor() + while (current_node) do + local v = table[current_node:type()] + if v then + require('neogen').generate({ type = v }) + break + else + current_node = current_node:parent() + end + end +end diff --git a/.vimrc b/.vimrc index 32bbcb8..2720533 100644 --- a/.vimrc +++ b/.vimrc @@ -239,6 +239,7 @@ Plug 'lervag/vimtex' Plug 'Shougo/echodoc.vim' "Plug 'python-rope/ropevim' Plug 'windwp/nvim-autopairs' +Plug 'danymat/neogen' " Unclear "Plug 'ncm2/float-preview.nvim' @@ -276,7 +277,9 @@ vnoremap ga :lua require('telescope.builtin').lsp_range_code_act "nnoremap ge lua vim.lsp.diagnostic.show_line_diagnostics({show_header = false, focusable = false}) nnoremap ge lua vim.diagnostic.open_float({focusable = false}) -nnoremap xx TroubleToggle +nnoremap xx TroubleToggle +"nnoremap nc lua neogen_dwim() +nnoremap nc lua require('neogen').generate({ type = 'any' }) " Set updatetime for CursorHold " 300ms of no cursor movement to trigger CursorHold @@ -292,8 +295,8 @@ autocmd BufWritePre *.go lua vim.lsp.buf.formatting_seq_sync(nil, 1000) autocmd BufWritePre *.go :silent! lua org_imports(3000) " Goto previous/next diagnostic warning/error -nnoremap g[ lua vim.lsp.diagnostic.goto_prev() -nnoremap g] lua vim.lsp.diagnostic.goto_next() +nnoremap g[ lua vim.diagnostic.goto_prev() +nnoremap g] lua vim.diagnostic.goto_next() let g:completion_matching_strategy_list = ['exact', 'substring', 'fuzzy'] let g:completion_matching_smart_case = 1