Neovim config updates

This commit is contained in:
Proctor
2021-11-12 19:44:12 -06:00
parent 41f7cb7e70
commit 1be7abd171
7 changed files with 29 additions and 13 deletions

View File

@@ -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") ; (nvim.fn.glob "~/.vimrc.local")

View File

@@ -0,0 +1,4 @@
(module dotfiles.plugin.dadbodui
{autoload { nvim aniseed.nvim }})

View File

@@ -41,6 +41,8 @@
:<c-k> "lua vim.lsp.buf.signature_help()" :<c-k> "lua vim.lsp.buf.signature_help()"
:<leader>ca "lua vim.lsp.buf.code_action()" :<leader>ca "lua vim.lsp.buf.code_action()"
:<leader>cl "lua vim.lsp.codelens.run()" :<leader>cl "lua vim.lsp.codelens.run()"
:<leader>ic "lua vim.lsp.buf.incoming_calls()"
:<leader>oc "lua vim.lsp.buf.outgoing_calls()"
:<leader>sld "lua vim.lsp.diagnostic.show_line_diagnostics()" :<leader>sld "lua vim.lsp.diagnostic.show_line_diagnostics()"
:<leader>rn "lua vim.lsp.buf.rename()" :<leader>rn "lua vim.lsp.buf.rename()"
:<leader>fa "lua vim.lsp.buf.formatting_sync()" :<leader>fa "lua vim.lsp.buf.formatting_sync()"
@@ -50,10 +52,10 @@
{:clojure {:clojure
{ {
:<leader>cn "call LspExecuteCommand('clean-ns')" :<leader>cn "call LspExecuteCommand('clean-ns')"
:<leader>ref "call LspExecuteCommand('extract-function', vim.api.nvim_eval(\"input('Function name: ')\")')" :<leader>ref "call LspExecuteCommand('extract-function', input('Function name: '))"
:<leader>id "call LspExecuteCommand('inline-symbol')" :<leader>id "call LspExecuteCommand('inline-symbol')"
:<leader>il "call LspExecuteCommand('introduce-let', vim.api.nvim_eval(\"input('Binding name: ')\")')" :<leader>il "call LspExecuteCommand('introduce-let', input('Binding name: '))"
:<leader>m2l "call LspExecuteCommand('move-to-let', vim.api.nvim_eval(\"input('Binding name: ')\")')" :<leader>m2l "call LspExecuteCommand('move-to-let', input('Binding name: '))"
} }
}) })
@@ -86,24 +88,25 @@
(bind-client-mappings client) (bind-client-mappings client)
(nvim.ex.autocmd :BufWritePre :<buffer> :lua "vim.lsp.buf.formatting_sync()") (nvim.ex.autocmd :BufWritePre :<buffer> :lua "vim.lsp.buf.formatting_sync()")
(nvim.ex.autocmd "BufEnter,CursorHold,InsertLeave" :<buffer> :lua "vim.lsp.codelens.refresh()") ; (nvim.ex.autocmd "BufEnter,CursorHold,InsertLeave" :<buffer> :lua "vim.lsp.codelens.refresh()")
; client autocmds ; client autocmds
; -- vim.api.nvim_command[[autocmd BufWritePre <buffer> 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 <buffer> 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.")) (print "LSP Client Attached."))
(let [lspi (require :lspinstall)] (let [lspi (require :lspinstall)]
(when lspi (when lspi
(defn lsp-execute-command [cmd ...] (defn lsp-execute-command [cmd ...]
(let [buf-uri (vim.uri_from_bufnr 0) (let [buf-uri (vim.uri_from_bufnr 0)
cursor (vim.api.nvim_win_get_cursor 0) cursor (vim.api.nvim_win_get_cursor 0)
r (- (a.first cursor) 1) r (- (a.first cursor) 1)
c (a.second cursor) 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 (vim.lsp.buf.execute_command {:command cmd
:arguments (a.merge args ...)}))) :arguments args})))
(defn setup-servers [] (defn setup-servers []
(lspi.setup) (lspi.setup)

View File

@@ -6,7 +6,7 @@
(telescope.setup (telescope.setup
{:defaults {:defaults
{:vimgrep_arguments ["ag" "--nocolor" "--noheading" {:vimgrep_arguments ["ag" "--nocolor" "--noheading"
"--number" "--column" "--number" "--column" "--nobreak"
"--smart-case" "--hidden" "--follow" "--skip-vcs-ignores" "--smart-case" "--hidden" "--follow" "--skip-vcs-ignores"
; "-g" "!.git/" ; "-g" "!.git/"
]}}) ]}})

View File

@@ -7,7 +7,7 @@
:rainbow {:enable true :rainbow {:enable true
:extended_mode true ; Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean :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 [ :colors [
:#dc322f ; red :#dc322f ; red
:#b58900 ; yellow :#b58900 ; yellow

View File

@@ -34,6 +34,7 @@
:airblade/vim-gitgutter {} ; Git :airblade/vim-gitgutter {} ; Git
:airblade/vim-gitgutter {} ; Git :airblade/vim-gitgutter {} ; Git
:clojure-vim/vim-jack-in {} ; Conjure support - jack-in with nrepl dependencies :clojure-vim/vim-jack-in {} ; Conjure support - jack-in with nrepl dependencies
:folke/lsp-colors.nvim {}
:hashivim/vim-terraform {} ; Terraform :hashivim/vim-terraform {} ; Terraform
:hrsh7th/nvim-compe {:mod :compe} ; autocomplete :hrsh7th/nvim-compe {:mod :compe} ; autocomplete
:jiangmiao/auto-pairs {} ; backets, parens, and quotes in pairs :jiangmiao/auto-pairs {} ; backets, parens, and quotes in pairs

View File

@@ -31,7 +31,9 @@ bind L resize-pane -R 5
setw -g mouse off 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 history-limit 6000
set -g window-status-style dim 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 -g update-environment "DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
set-environment -g 'SSH_AUTH_SOCK' ~/.ssh/ssh_auth_sock 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 set-option -g focus-events on