From 1be7abd1711367c76150490d3a6c5ab1a7175c8b Mon Sep 17 00:00:00 2001 From: Proctor Date: Fri, 12 Nov 2021 19:44:12 -0600 Subject: [PATCH] Neovim config updates --- nvim/.config/nvim/fnl/dotfiles/core.fnl | 3 ++- .../nvim/fnl/dotfiles/plugin/dadbodui.fnl | 4 ++++ .../nvim/fnl/dotfiles/plugin/lspconfig.fnl | 19 +++++++++++-------- .../nvim/fnl/dotfiles/plugin/telescope.fnl | 2 +- .../nvim/fnl/dotfiles/plugin/treesitter.fnl | 2 +- nvim/.config/nvim/fnl/dotfiles/plugins.fnl | 1 + tmux.conf | 11 +++++++++-- 7 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 nvim/.config/nvim/fnl/dotfiles/plugin/dadbodui.fnl diff --git a/nvim/.config/nvim/fnl/dotfiles/core.fnl b/nvim/.config/nvim/fnl/dotfiles/core.fnl index fda10db..8a29c91 100644 --- a/nvim/.config/nvim/fnl/dotfiles/core.fnl +++ b/nvim/.config/nvim/fnl/dotfiles/core.fnl @@ -96,6 +96,7 @@ -; (nvim.ex.autocmd "vimenter" "*" "++nested" "colorscheme" "solarized8") +(nvim.ex.autocmd "vimenter" "*" "++nested" "colorscheme" "solarized8") +;(nvim.ex.autocmd "vimenter" "*" "luafile" "treesitter.lua") ; ; (nvim.fn.glob "~/.vimrc.local") diff --git a/nvim/.config/nvim/fnl/dotfiles/plugin/dadbodui.fnl b/nvim/.config/nvim/fnl/dotfiles/plugin/dadbodui.fnl new file mode 100644 index 0000000..e650200 --- /dev/null +++ b/nvim/.config/nvim/fnl/dotfiles/plugin/dadbodui.fnl @@ -0,0 +1,4 @@ +(module dotfiles.plugin.dadbodui + {autoload { nvim aniseed.nvim }}) + + diff --git a/nvim/.config/nvim/fnl/dotfiles/plugin/lspconfig.fnl b/nvim/.config/nvim/fnl/dotfiles/plugin/lspconfig.fnl index 77b6764..2c22333 100644 --- a/nvim/.config/nvim/fnl/dotfiles/plugin/lspconfig.fnl +++ b/nvim/.config/nvim/fnl/dotfiles/plugin/lspconfig.fnl @@ -41,6 +41,8 @@ : "lua vim.lsp.buf.signature_help()" :ca "lua vim.lsp.buf.code_action()" :cl "lua vim.lsp.codelens.run()" + :ic "lua vim.lsp.buf.incoming_calls()" + :oc "lua vim.lsp.buf.outgoing_calls()" :sld "lua vim.lsp.diagnostic.show_line_diagnostics()" :rn "lua vim.lsp.buf.rename()" :fa "lua vim.lsp.buf.formatting_sync()" @@ -50,10 +52,10 @@ {:clojure { :cn "call LspExecuteCommand('clean-ns')" - :ref "call LspExecuteCommand('extract-function', vim.api.nvim_eval(\"input('Function name: ')\")')" + :ref "call LspExecuteCommand('extract-function', input('Function name: '))" :id "call LspExecuteCommand('inline-symbol')" - :il "call LspExecuteCommand('introduce-let', vim.api.nvim_eval(\"input('Binding name: ')\")')" - :m2l "call LspExecuteCommand('move-to-let', vim.api.nvim_eval(\"input('Binding name: ')\")')" + :il "call LspExecuteCommand('introduce-let', input('Binding name: '))" + :m2l "call LspExecuteCommand('move-to-let', input('Binding name: '))" } }) @@ -86,24 +88,25 @@ (bind-client-mappings client) (nvim.ex.autocmd :BufWritePre : :lua "vim.lsp.buf.formatting_sync()") - (nvim.ex.autocmd "BufEnter,CursorHold,InsertLeave" : :lua "vim.lsp.codelens.refresh()") +; (nvim.ex.autocmd "BufEnter,CursorHold,InsertLeave" : :lua "vim.lsp.codelens.refresh()") ; client autocmds -; -- vim.api.nvim_command[[autocmd BufWritePre lua vim.lsp.buf_request_sync(vim.api.nvim_get_current_buf(), 'workspace/executeCommand', {command = 'clean-ns', arguments = {vim.uri_from_bufnr(0), vim.api.nvim_win_get_cursor(0)[1], vim.api.nvim_win_get_cursor(0)[2]}, title = 'Clean Namespace'})]] +; -- vim.api.nvim_command[[autocmd BufWritePre lua vim.lsp.buf_request_sync(vim.api.nvim_get_current_buf(), 'workspace/executeCommand', {command = 'clean-ns', arguments = {vim.uri_from_bufnr(1), vim.api.nvim_win_get_cursor(0)[1], vim.api.nvim_win_get_cursor(0)[2]}, title = 'Clean Namespace'})]] (print "LSP Client Attached.")) (let [lspi (require :lspinstall)] (when lspi + (defn lsp-execute-command [cmd ...] (let [buf-uri (vim.uri_from_bufnr 0) cursor (vim.api.nvim_win_get_cursor 0) r (- (a.first cursor) 1) c (a.second cursor) - args [buf-uri r c] - ] + opts [buf-uri r c] + args (a.concat opts [...])] (vim.lsp.buf.execute_command {:command cmd - :arguments (a.merge args ...)}))) + :arguments args}))) (defn setup-servers [] (lspi.setup) diff --git a/nvim/.config/nvim/fnl/dotfiles/plugin/telescope.fnl b/nvim/.config/nvim/fnl/dotfiles/plugin/telescope.fnl index 7120f1c..dc353f0 100644 --- a/nvim/.config/nvim/fnl/dotfiles/plugin/telescope.fnl +++ b/nvim/.config/nvim/fnl/dotfiles/plugin/telescope.fnl @@ -6,7 +6,7 @@ (telescope.setup {:defaults {:vimgrep_arguments ["ag" "--nocolor" "--noheading" - "--number" "--column" + "--number" "--column" "--nobreak" "--smart-case" "--hidden" "--follow" "--skip-vcs-ignores" ; "-g" "!.git/" ]}}) diff --git a/nvim/.config/nvim/fnl/dotfiles/plugin/treesitter.fnl b/nvim/.config/nvim/fnl/dotfiles/plugin/treesitter.fnl index 1e46e5b..8fa9905 100644 --- a/nvim/.config/nvim/fnl/dotfiles/plugin/treesitter.fnl +++ b/nvim/.config/nvim/fnl/dotfiles/plugin/treesitter.fnl @@ -7,7 +7,7 @@ :rainbow {:enable true :extended_mode true ; Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean - :max_file_lines 1000 ; Do not enable for files with more than 1000 lines, int + :max_file_lines 10000 ; Do not enable for files with more than 1000 lines, int :colors [ :#dc322f ; red :#b58900 ; yellow diff --git a/nvim/.config/nvim/fnl/dotfiles/plugins.fnl b/nvim/.config/nvim/fnl/dotfiles/plugins.fnl index f8f7c9f..b6c8a76 100644 --- a/nvim/.config/nvim/fnl/dotfiles/plugins.fnl +++ b/nvim/.config/nvim/fnl/dotfiles/plugins.fnl @@ -34,6 +34,7 @@ :airblade/vim-gitgutter {} ; Git :airblade/vim-gitgutter {} ; Git :clojure-vim/vim-jack-in {} ; Conjure support - jack-in with nrepl dependencies + :folke/lsp-colors.nvim {} :hashivim/vim-terraform {} ; Terraform :hrsh7th/nvim-compe {:mod :compe} ; autocomplete :jiangmiao/auto-pairs {} ; backets, parens, and quotes in pairs diff --git a/tmux.conf b/tmux.conf index 96d2dea..56cdbfc 100644 --- a/tmux.conf +++ b/tmux.conf @@ -31,7 +31,9 @@ bind L resize-pane -R 5 setw -g mouse off -set -g default-terminal "xterm-256color" +# set -g default-terminal "xterm-25:color" +# set -g default-terminal "${TERM}" +set -g default-terminal "tmux-256color" set -g history-limit 6000 set -g window-status-style dim @@ -44,5 +46,10 @@ set -g status-right '#(~/dotfiles/bin/tmux_battery_charge_indicator.sh) #[bg=whi set -g update-environment "DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY" set-environment -g 'SSH_AUTH_SOCK' ~/.ssh/ssh_auth_sock -set-option -sa terminal-overrides ',xterm-256color:RGB' +set-option -as terminal-overrides ',xterm-256color:RGB' + +# Undercurl +# set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support +# set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0 + set-option -g focus-events on