From aab3bef14aa6c7d6a57ff6d457ff41aed61353d1 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Tue, 9 Jan 2024 13:09:11 -0800 Subject: [PATCH 1/6] tmux & vim --- .tmux.conf | 5 +++-- .vim/nvim.lua | 45 +++++++++++++++++++++++++++++---------------- .vimrc | 12 ++++++++++-- 3 files changed, 42 insertions(+), 20 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 3c76fe2..4de1421 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -46,7 +46,6 @@ bind-key C-t new-window "ttyd -R -d -t fontSize=18 tmux attach -t `tmux display #set -g status-bg black set -g status-interval 1 #set -g status-left '#[fg=green]#H#[default]' -#set -g status-left-length 20 #set -g status-right '#[fg=green]#(~/src/tpom/tpom) #[fg=cyan,bold]%Y-%m-%d %H:%M:%S#[default]' set -g status-justify centre # center align window list set -g status-style fg=white,bg=default @@ -61,8 +60,10 @@ set-window-option -g window-status-current-style fg=cyan,bg=default,bright set-window-option -g window-style fg=#aaaaaa,bg=terminal set-window-option -g window-active-style fg=terminal,bg=terminal -set -g status-left '#[fg=green][ #H ][ ' +set -g status-left '#[fg=green][ #h ][' +set -g status-left-length 40 set -g status-right '#[fg=green]][ #{pane_width}x#{pane_height} #[bright]#[fg=blue]%Y-%m-%d #[fg=white]%I:%M #[dim]#[fg=green]]' +set -g status-right-length 40 # Notifying if other windows has activities setw -g monitor-activity on diff --git a/.vim/nvim.lua b/.vim/nvim.lua index 2ee4804..1ed2ca3 100644 --- a/.vim/nvim.lua +++ b/.vim/nvim.lua @@ -36,22 +36,23 @@ nvim_lsp.rust_analyzer.setup({ } }) nvim_lsp.gopls.setup({ - on_attach = function (client, bufnr) - client.server_capabilities.semanticTokensProvider = { - full = true, - legend = { - --tokenTypes = { 'namespace', 'type', 'class', 'enum', 'interface', 'struct', 'typeParameter', 'parameter', 'variable', 'property', 'enumMember', 'event', 'function', 'method', 'macro', 'keyword', 'modifier', 'comment', 'string', 'number', 'regexp', 'operator', 'decorator', }, - tokenTypes = { 'namespace' }, - tokenModifiers = { 'declaration', 'definition', 'readonly', 'static', 'deprecated', 'abstract', 'async', 'modification', 'documentation', 'defaultLibrary', - }, - } - } - end, - settings = { - gopls = { - semanticTokens = true, - }, - }, + on_attach = function(client, bufnr) + client.server_capabilities.semanticTokensProvider = { + full = true, + legend = { + --tokenTypes = { 'namespace', 'type', 'class', 'enum', 'interface', 'struct', 'typeParameter', 'parameter', 'variable', 'property', 'enumMember', 'event', 'function', 'method', 'macro', 'keyword', 'modifier', 'comment', 'string', 'number', 'regexp', 'operator', 'decorator', }, + tokenTypes = { 'namespace' }, + tokenModifiers = { 'declaration', 'definition', 'readonly', 'static', 'deprecated', 'abstract', 'async', + 'modification', 'documentation', 'defaultLibrary', + }, + } + } + end, + settings = { + gopls = { + semanticTokens = true, + }, + }, }) nvim_lsp.pyright.setup({ on_attach = on_attach }) @@ -475,6 +476,18 @@ require "neogen".setup {} require('leap').set_default_keymaps() require("flit").setup {} +require('snippy').setup({ + mappings = { + is = { + [',,'] = 'expand_or_advance', + [',.'] = 'previous', + }, + nx = { + ['x'] = 'cut_text', + }, + }, +}) + --- --- My own "where" clause generator for Rust diff --git a/.vimrc b/.vimrc index cc5bc4e..73062b5 100644 --- a/.vimrc +++ b/.vimrc @@ -141,7 +141,10 @@ Plug 'vim-airline/vim-airline-themes' Plug 'airblade/vim-rooter' "Plug 'bling/vim-bufferline' Plug 'majutsushi/tagbar' -Plug 'SirVer/ultisnips' +"Plug 'SirVer/ultisnips' +Plug 'dcampos/nvim-snippy' +Plug 'rafamadriz/friendly-snippets' + Plug 'honza/vim-snippets' "Plug 'fatih/vim-go' Plug 'tpope/vim-abolish' @@ -280,7 +283,7 @@ nnoremap gW lua vim.lsp.buf.workspace_symbol() "nnoremap gd lua vim.lsp.buf.declaration() nnoremap ga lua vim.lsp.buf.code_action() "nnoremap ga lua require('telescope.builtin').lsp_code_actions({initial_mode = "normal"}) -vnoremap ga lua vim.lsp.buf.range_code_action() +vnoremap ga lua vim.lsp.buf.code_action() "vnoremap ga :lua require('telescope.builtin').lsp_range_code_actions({initial_mode = "normal"}) "nnoremap ge lua vim.lsp.diagnostic.show_line_diagnostics({show_header = false, focusable = false}) "nnoremap ge lua vim.diagnostic.open_float({focusable = false}) @@ -1083,3 +1086,8 @@ map command! -nargs=0 Syn call Syn() " Final hi links for TreeSitter hi link @type.rust TSCSecondaryTypeParam + +let s:gptool_temp = expand($HOME . '/src/gptool/bindings.vim') +if filereadable(s:gptool_temp) + exec ':so ' . s:gptool_temp +endif From 4eca2ee06aec6ae4b5ba8b960312c49bcbe8bf2b Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Tue, 9 Jan 2024 13:20:23 -0800 Subject: [PATCH 2/6] right prompt to nil, ignore work configs --- .config/fish/.gitignore | 1 + .config/fish/config.fish | 4 ++++ .config/fish/functions/fish_right_prompt.fish | 1 + 3 files changed, 6 insertions(+) create mode 100644 .config/fish/.gitignore create mode 100644 .config/fish/functions/fish_right_prompt.fish diff --git a/.config/fish/.gitignore b/.config/fish/.gitignore new file mode 100644 index 0000000..44e4e55 --- /dev/null +++ b/.config/fish/.gitignore @@ -0,0 +1 @@ +work.fish diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 8160044..0fababc 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -16,6 +16,10 @@ if test -e $HOME/.asdf/asdf.fish . ~/.asdf/asdf.fish end +if test -e $HOME/.config/fish/work.fish + . ~/.config/fish/work.fish +end + . ~/.config/fish/fish_aliases.fish # The next line updates PATH for the Google Cloud SDK. diff --git a/.config/fish/functions/fish_right_prompt.fish b/.config/fish/functions/fish_right_prompt.fish new file mode 100644 index 0000000..25b3eab --- /dev/null +++ b/.config/fish/functions/fish_right_prompt.fish @@ -0,0 +1 @@ +function fish_right_prompt; end From 2e878811950c1cc55db04f495509bcf4737f18e1 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Tue, 9 Jan 2024 13:24:18 -0800 Subject: [PATCH 3/6] python/efm config that's better --- .vim/filetype.vim | 3 + .vim/nvim.lua | 165 +++++++++++++++++++++++++++++++++++++++++++++--------- .vimrc | 11 ++-- 3 files changed, 148 insertions(+), 31 deletions(-) diff --git a/.vim/filetype.vim b/.vim/filetype.vim index 09676a1..20dba9f 100644 --- a/.vim/filetype.vim +++ b/.vim/filetype.vim @@ -99,6 +99,9 @@ augroup go autocmd FileType go set softtabstop=2 autocmd FileType go set shiftwidth=2 autocmd FileType go set noexpandtab + autocmd FileType go imap rr :GoIfErr + autocmd FileType go nmap rr :GoIfErr + autocmd FileType go nnoremap im lua require('telescope').extensions.goimpl.goimpl{theme = "ivy", layout_config = {height = 10}} "autocmd FileType go nmap gd (go-doc) "autocmd FileType go nmap gd (go-def) augroup END diff --git a/.vim/nvim.lua b/.vim/nvim.lua index d441658..e6837a2 100644 --- a/.vim/nvim.lua +++ b/.vim/nvim.lua @@ -7,6 +7,13 @@ local nvim_lsp = require 'lspconfig' local on_attach = function(client) end +-- Set my preferred diagnostic options +local diagnostic_options = { + virtual_text = false, + signs = true, + update_in_insert = false, +} + local rust_capabilities = vim.lsp.protocol.make_client_capabilities() rust_capabilities.textDocument.completion.completionItem.snippetSupport = true rust_capabilities.textDocument.completion.completionItem.resolveSupport = { @@ -17,6 +24,16 @@ rust_capabilities.textDocument.completion.completionItem.resolveSupport = { } } +local default_capabilities = vim.lsp.protocol.make_client_capabilities() +default_capabilities.textDocument.completion.completionItem.snippetSupport = true +default_capabilities.textDocument.completion.completionItem.resolveSupport = { + properties = { + 'documentation', + 'detail', + 'additionalTextEdits', + } +} + -- Enable rust_analyzer nvim_lsp.rust_analyzer.setup({ on_attach = function(client, bufnr) @@ -54,7 +71,80 @@ nvim_lsp.gopls.setup({ }, }, }) -nvim_lsp.pyright.setup({ on_attach = on_attach }) + +local function filter(arr, func) + -- Filter in place + -- https://stackoverflow.com/questions/49709998/how-to-filter-a-lua-array-inplace + local new_index = 1 + local size_orig = #arr + for old_index, v in ipairs(arr) do + if func(v, old_index) then + arr[new_index] = v + new_index = new_index + 1 + end + end + for i = new_index, size_orig do arr[i] = nil end +end + +local function pyright_accessed_filter(diagnostic) + -- Allow kwargs to be unused, sometimes you want many functions to take the + -- same arguments but you don't use all the arguments in all the functions, + -- so kwargs is used to suck up all the extras + if diagnostic.message == '"kwargs" is not accessed' then + return false + end + -- Allow variables starting with an underscore + if string.match(diagnostic.message, '"_.+" is not accessed') then + return false + end + + return true +end + +local function pyright_custom_diagnostic(a, params, client_id, c, config) + filter(params.diagnostics, pyright_accessed_filter) + vim.lsp.diagnostic.on_publish_diagnostics(a, params, client_id, c, config) +end + +nvim_lsp.pyright.setup({ on_attach = function(client, bufnr) + vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(pyright_custom_diagnostic, diagnostic_options) +end}) +--nvim_lsp.pyright.setup({ on_attach = on_attach }) +--nvim_lsp.pylsp.setup({ + --on_attach = on_attach, + --settings = { + --pylsp = { + --plugins = { + ---- formatter options + ----black = { enabled = true }, + --autopep8 = { enabled = false }, + --yapf = { enabled = false }, + ---- linter options + --pylint = { enabled = false, executable = "pylint" }, + --pyflakes = { enabled = false }, + --pycodestyle = { enabled = false }, + ---- type checker + --pylsp_mypy = { enabled = true }, + ---- auto-completion options + --jedi_completion = { enabled = false }, + ---- import sorting + ----pyls_isort = { enabled = true }, + ----flake8 = { + ----maxLineLength = 100, + ----}, + --pycodestyle = { + --maxLineLength = 100, + --}, + ----rope_autoimport = { + ----enabled = true + ----}, + ----rope_completion = { + ----enabled = true + ----}, + --} + --} + --} +--}) --nvim_lsp.clangd.setup({ on_attach = on_attach }) nvim_lsp.tsserver.setup { @@ -100,7 +190,12 @@ require 'lspconfig'.lua_ls.setup { }, } -require('go').setup() + +require('go').setup({ + iferr_vertical_shift = 2 +}) + +require('telescope').load_extension('goimpl') function org_imports(wait_ms) local params = vim.lsp.util.make_range_params() @@ -120,35 +215,42 @@ function org_imports(wait_ms) end end -nvim_lsp.efm.setup { - init_options = { documentFormatting = true }, - settings = { - rootMarkers = { ".git/", "package.json" }, - languages = { - lua = { - { formatCommand = "lua-format -i", formatStdin = true } - }, - python = { - { formatCommand = 'black --quiet -', formatStdin = true } - }, - rust = { - { formatCommand = 'rustfmt', formatStdin = true } - }, - typescript = { - { formatCommand = 'pnpm exec eslint --fix' } - } - } - } +-- register linters +local luaformat = require("efmls-configs.formatters.lua_format") +local rustfmt = require('efmls-configs.formatters.rustfmt') +local black = require('efmls-configs.formatters.black') +local mypy = require('efmls-configs.linters.mypy') +local eslint = require('efmls-configs.linters.eslint') +local isort = require('efmls-configs.formatters.isort') +local languages = { + typescript = { eslint }, + lua = { luaformat }, + python = { black, mypy, isort }, + rust = { rustfmt }, } +local efmls_config = { + filetypes = vim.tbl_keys(languages), + settings = { + rootMarkers = { '.git/' }, + languages = languages, + }, + init_options = { + documentFormatting = true, + documentRangeFormatting = true, + }, +} + +require('lspconfig').efm.setup(vim.tbl_extend('force', efmls_config, { + -- Pass your custom lsp config below like on_attach and capabilities + on_attach = on_attach, + capabilities = default_capabilities, +})) + -- Enable diagnostics vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( - vim.lsp.diagnostic.on_publish_diagnostics, { - virtual_text = false, - signs = true, - update_in_insert = false, -} -) + vim.lsp.diagnostic.on_publish_diagnostics, + diagnostic_options) -- Compe setup require 'compe'.setup { @@ -321,6 +423,12 @@ require('telescope').setup { }, }, pickers = { + goimpl = { + theme = "ivy", + layout_config = { + height = 10, + }, + }, lsp_code_actions = { theme = "ivy", layout_config = { @@ -367,6 +475,7 @@ require('telescope').setup { layout_config = { height = 15, }, + ignore_current_buffer = true, initial_mode = "normal", }, }, @@ -571,3 +680,5 @@ function neogen_dwim() end end end + +require("murdock") diff --git a/.vimrc b/.vimrc index 73062b5..5e61d1e 100644 --- a/.vimrc +++ b/.vimrc @@ -222,7 +222,9 @@ Plug 'ray-x/go.nvim' Plug 'RishabhRD/popfix' Plug 'RishabhRD/nvim-lsputils' +Plug 'stevanmilic/nvim-lspimport' Plug 'folke/trouble.nvim' +Plug 'creativenull/efmls-configs-nvim', { 'tag': 'v1.*' } " Plugins that do specific things "Plug 'Shougo/vimproc.vim' @@ -254,6 +256,7 @@ Plug 'danymat/neogen' " Unclear "Plug 'ncm2/float-preview.nvim' Plug 'lambdalisue/gina.vim' +Plug 'edolphin-ydf/goimpl.nvim' call plug#end() @@ -292,6 +295,8 @@ nnoremap xx TroubleToggle nnoremap xq lua vim.diagnostic.setqflist() "nnoremap nc lua neogen_dwim() nnoremap nc lua require('neogen').generate({ type = 'any' }) +nnoremap gm lua require('lspimport').import() + " Set updatetime for CursorHold " 300ms of no cursor movement to trigger CursorHold @@ -1029,7 +1034,8 @@ nnoremap hh :A " CommandT is useful, but if I'm juggling lots of buffers, limit it to another " one I have open (instead of standard t). "nnoremap o :Buffers -nnoremap o lua require('telescope.builtin').buffers{} +nnoremap o lua require('telescope.builtin').buffers{initial_mode = "insert"} +nnoremap lua require('telescope.builtin').buffers{prompt_prefix = " "} "nnoremap j "nnoremap p :PTW nnoremap p :LustyJugglePrevious @@ -1046,9 +1052,6 @@ endif " ** SEE ALSO ** " filetype.vim -command Comments lexpr system($HOME . '/src/gogh/src/github.com/barakmich/gogh/gogh') - - "call remote#host#RegisterPlugin('python3', '/home/barak/.vim/bundle/deoplete.nvim/rplugin/python3/deoplete', [ "\ {'sync': v:true, 'name': '_deoplete', 'type': 'function', 'opts': {}}, "\ ]) From fc663940ff92b2c8c13b828bd479b855a57c27be Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Tue, 9 Jan 2024 13:32:30 -0800 Subject: [PATCH 4/6] [nvim] filetype-lua update and nvim.lua cleanup --- .vim/filetype.vim | 1 + .vim/nvim.lua | 147 ++++++++++++++++++++++++------------------------------ 2 files changed, 66 insertions(+), 82 deletions(-) diff --git a/.vim/filetype.vim b/.vim/filetype.vim index 20dba9f..48fb035 100644 --- a/.vim/filetype.vim +++ b/.vim/filetype.vim @@ -124,6 +124,7 @@ autocmd FileType proto let b:auto_trim_whitespace=1 autocmd FileType hy let b:auto_trim_whitespace=1 autocmd FileType idris let b:auto_trim_whitespace=1 autocmd FileType java let b:auto_trim_whitespace=1 +autocmd FileType lua let b:auto_trim_whitespace=1 augroup templates autocmd BufNewFile *.vue 0r ~/.vim/skeletons/vue.skel diff --git a/.vim/nvim.lua b/.vim/nvim.lua index e6837a2..5c69511 100644 --- a/.vim/nvim.lua +++ b/.vim/nvim.lua @@ -73,77 +73,77 @@ nvim_lsp.gopls.setup({ }) local function filter(arr, func) - -- Filter in place - -- https://stackoverflow.com/questions/49709998/how-to-filter-a-lua-array-inplace - local new_index = 1 - local size_orig = #arr - for old_index, v in ipairs(arr) do - if func(v, old_index) then - arr[new_index] = v - new_index = new_index + 1 - end + -- Filter in place + -- https://stackoverflow.com/questions/49709998/how-to-filter-a-lua-array-inplace + local new_index = 1 + local size_orig = #arr + for old_index, v in ipairs(arr) do + if func(v, old_index) then + arr[new_index] = v + new_index = new_index + 1 end - for i = new_index, size_orig do arr[i] = nil end + end + for i = new_index, size_orig do arr[i] = nil end end local function pyright_accessed_filter(diagnostic) - -- Allow kwargs to be unused, sometimes you want many functions to take the - -- same arguments but you don't use all the arguments in all the functions, - -- so kwargs is used to suck up all the extras - if diagnostic.message == '"kwargs" is not accessed' then - return false - end - -- Allow variables starting with an underscore - if string.match(diagnostic.message, '"_.+" is not accessed') then - return false - end + -- Allow kwargs to be unused, sometimes you want many functions to take the + -- same arguments but you don't use all the arguments in all the functions, + -- so kwargs is used to suck up all the extras + if diagnostic.message == '"kwargs" is not accessed' then + return false + end + -- Allow variables starting with an underscore + if string.match(diagnostic.message, '"_.+" is not accessed') then + return false + end - return true + return true end local function pyright_custom_diagnostic(a, params, client_id, c, config) - filter(params.diagnostics, pyright_accessed_filter) - vim.lsp.diagnostic.on_publish_diagnostics(a, params, client_id, c, config) + filter(params.diagnostics, pyright_accessed_filter) + vim.lsp.diagnostic.on_publish_diagnostics(a, params, client_id, c, config) end nvim_lsp.pyright.setup({ on_attach = function(client, bufnr) - vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(pyright_custom_diagnostic, diagnostic_options) -end}) + vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(pyright_custom_diagnostic, diagnostic_options) +end }) --nvim_lsp.pyright.setup({ on_attach = on_attach }) ---nvim_lsp.pylsp.setup({ - --on_attach = on_attach, - --settings = { - --pylsp = { - --plugins = { - ---- formatter options - ----black = { enabled = true }, - --autopep8 = { enabled = false }, - --yapf = { enabled = false }, - ---- linter options - --pylint = { enabled = false, executable = "pylint" }, - --pyflakes = { enabled = false }, - --pycodestyle = { enabled = false }, - ---- type checker - --pylsp_mypy = { enabled = true }, - ---- auto-completion options - --jedi_completion = { enabled = false }, - ---- import sorting - ----pyls_isort = { enabled = true }, - ----flake8 = { - ----maxLineLength = 100, - ----}, - --pycodestyle = { - --maxLineLength = 100, - --}, - ----rope_autoimport = { - ----enabled = true - ----}, - ----rope_completion = { - ----enabled = true - ----}, - --} - --} - --} +--nvim_lsp.pylsp.setup({ +--on_attach = on_attach, +--settings = { +--pylsp = { +--plugins = { +---- formatter options +----black = { enabled = true }, +--autopep8 = { enabled = false }, +--yapf = { enabled = false }, +---- linter options +--pylint = { enabled = false, executable = "pylint" }, +--pyflakes = { enabled = false }, +--pycodestyle = { enabled = false }, +---- type checker +--pylsp_mypy = { enabled = true }, +---- auto-completion options +--jedi_completion = { enabled = false }, +---- import sorting +----pyls_isort = { enabled = true }, +----flake8 = { +----maxLineLength = 100, +----}, +--pycodestyle = { +--maxLineLength = 100, +--}, +----rope_autoimport = { +----enabled = true +----}, +----rope_completion = { +----enabled = true +----}, +--} +--} +--} --}) --nvim_lsp.clangd.setup({ on_attach = on_attach }) @@ -249,8 +249,9 @@ require('lspconfig').efm.setup(vim.tbl_extend('force', efmls_config, { -- Enable diagnostics vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( - vim.lsp.diagnostic.on_publish_diagnostics, - diagnostic_options) + vim.lsp.diagnostic.on_publish_diagnostics, + diagnostic_options +) -- Compe setup require 'compe'.setup { @@ -283,7 +284,7 @@ require 'compe'.setup { --require'lsp_signature'.on_attach(signature_cfg) -saga_cfg = { +local saga_cfg = { code_action_prompt = { enable = false, sign = false, @@ -317,6 +318,7 @@ _G.tab_complete = function() return vim.fn['compe#complete']() end end + _G.s_tab_complete = function() if vim.fn.pumvisible() == 1 then return t "" @@ -482,25 +484,6 @@ require('telescope').setup { } -local dropdown = require 'telescope.themes'.get_dropdown({ - --previewer = false, - --prompt_title = "", - --results_height = 16, - --width = 0.6, - --borderchars = { - --{"─", "│", "─", "│", "╭", "╮", "╯", "╰"}, - --prompt = {"─", "│", " ", "│", "╭", "╮", "│", "│"}, - --results = {"─", "│", "─", "│", "├", "┤", "╯", "╰"}, - --preview = {"─", "│", "─", "│", "╭", "╮", "╯", "╰"} - --}, - --winblend = 10 -}) - -local telescope_ivy = require 'telescope.themes'.get_ivy({ - -}) - - -- -- Treesitter -- @@ -607,7 +590,7 @@ function string.insert(str1, str2, pos) end function string.split(s, delimiter) - result = {}; + local result = {}; for match in (s .. delimiter):gmatch("(.-)" .. delimiter) do table.insert(result, match); end From 61df077539c0dc6d3d674421fac4e44e23b3ed19 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Tue, 9 Jan 2024 13:34:15 -0800 Subject: [PATCH 5/6] [misc] cargo in bash, smaller spotify on 4k --- .bash_profile | 1 + .bashrc | 1 + .config/fish/conf.d/virtualfish-loader.fish | 8 ++++---- .local/share/applications/com.spotify.Client.desktop | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.bash_profile b/.bash_profile index 9aee501..6df125f 100644 --- a/.bash_profile +++ b/.bash_profile @@ -20,3 +20,4 @@ fi # Added by ~/.emacs.d/install.sh export PATH=$HOME/.cask/bin:$PATH +. "$HOME/.cargo/env" diff --git a/.bashrc b/.bashrc index f714772..57a4468 100644 --- a/.bashrc +++ b/.bashrc @@ -161,3 +161,4 @@ fi if [ -f ~/local/google-cloud-sdk/completion.bash.inc ]; then . ~/local/google-cloud-sdk/completion.bash.inc fi +. "$HOME/.cargo/env" diff --git a/.config/fish/conf.d/virtualfish-loader.fish b/.config/fish/conf.d/virtualfish-loader.fish index e306e12..88cbd8e 100644 --- a/.config/fish/conf.d/virtualfish-loader.fish +++ b/.config/fish/conf.d/virtualfish-loader.fish @@ -1,4 +1,4 @@ -#set -g VIRTUALFISH_VERSION 2.5.5 -#set -g VIRTUALFISH_PYTHON_EXEC /usr/bin/python -#source /usr/local/lib/python3.10/site-packages/virtualfish/virtual.fish -emit virtualfish_did_setup_plugins +set -g VIRTUALFISH_VERSION 2.5.5 +set -g VIRTUALFISH_PYTHON_EXEC /bin/python +source /home/barak/.local/lib/python3.11/site-packages/virtualfish/virtual.fish +emit virtualfish_did_setup_plugins \ No newline at end of file diff --git a/.local/share/applications/com.spotify.Client.desktop b/.local/share/applications/com.spotify.Client.desktop index f2f9fc4..1240b5d 100755 --- a/.local/share/applications/com.spotify.Client.desktop +++ b/.local/share/applications/com.spotify.Client.desktop @@ -4,7 +4,7 @@ Name=Spotify GenericName=Online music streaming service Comment=Access all of your favorite music Icon=com.spotify.Client -Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=spotify --file-forwarding com.spotify.Client --force-device-scale-factor=2 @@u %U @@ +Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=spotify --file-forwarding com.spotify.Client --force-device-scale-factor=1.5 @@u %U @@ Terminal=false MimeType=x-scheme-handler/spotify; Categories=Audio;Music;AudioVideo; From b9b5ebe8079f5532fc38858812cd6e6be79bfab1 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Tue, 16 Jan 2024 15:41:36 -0800 Subject: [PATCH 6/6] [vim] iferr `,ife` and better previews when searching files --- .vim/filetype.vim | 4 ++-- .vim/nvim.lua | 2 ++ .vimrc | 11 +++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.vim/filetype.vim b/.vim/filetype.vim index 48fb035..f65b25b 100644 --- a/.vim/filetype.vim +++ b/.vim/filetype.vim @@ -99,8 +99,8 @@ augroup go autocmd FileType go set softtabstop=2 autocmd FileType go set shiftwidth=2 autocmd FileType go set noexpandtab - autocmd FileType go imap rr :GoIfErr - autocmd FileType go nmap rr :GoIfErr + autocmd FileType go imap ife :GoIfErr + autocmd FileType go nmap ife :GoIfErr autocmd FileType go nnoremap im lua require('telescope').extensions.goimpl.goimpl{theme = "ivy", layout_config = {height = 10}} "autocmd FileType go nmap gd (go-doc) "autocmd FileType go nmap gd (go-def) diff --git a/.vim/nvim.lua b/.vim/nvim.lua index 5c69511..a8aa9ee 100644 --- a/.vim/nvim.lua +++ b/.vim/nvim.lua @@ -423,6 +423,8 @@ require('telescope').setup { ["ff"] = require('telescope.actions').send_to_qflist, }, }, + path_display = { "smart", "shorten" }, + dynamic_preview_title = true, }, pickers = { goimpl = { diff --git a/.vimrc b/.vimrc index 5e61d1e..011b093 100644 --- a/.vimrc +++ b/.vimrc @@ -83,6 +83,17 @@ if exists('veonim') set guifont=Droid\ Sans\ Mono\ Dotted:h20 " set linespace=10 endif + +if exists('g:neovide') + let g:neovide_floating_blur_amount_x = 2.0 + let g:neovide_floating_blur_amount_y = 2.0 + let g:neovide_transparency = 0.95 + let g:neovide_scroll_animation_length = 0.1 + let g:neovide_cursor_animation_length = 0.05 + let g:neovide_cursor_trail_size = 0.5 +endif + + " * Polyglot let g:tex_flavor = 'latex'