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