mirror of
https://github.com/stevenproctor/dotfiles.git
synced 2026-01-28 09:59:54 -06:00
Fix keybindings, concela, and update plugins
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
|
|
||||||
(def conceals {:defn :𝑓
|
(def conceals {:defn :𝑓
|
||||||
|
;; :defn- :
|
||||||
:fn :λ
|
:fn :λ
|
||||||
:lambda :λ
|
:lambda :λ
|
||||||
:and :∧
|
:and :∧
|
||||||
@@ -36,8 +37,8 @@
|
|||||||
(let [the-match (.. "\\<" the-match "\\>" )]
|
(let [the-match (.. "\\<" the-match "\\>" )]
|
||||||
(nvim.fn.matchadd :Conceal the-match 0 -1 {:conceal replacement})))
|
(nvim.fn.matchadd :Conceal the-match 0 -1 {:conceal replacement})))
|
||||||
|
|
||||||
(set nvim.wo.concealcursor :nvc)
|
(set nvim.wo.conceallevel 2)
|
||||||
(set nvim.wo.conceallevel 2))
|
(set nvim.wo.concealcursor :nvc))
|
||||||
|
|
||||||
|
|
||||||
(defn toggle-conceal []
|
(defn toggle-conceal []
|
||||||
@@ -55,6 +56,6 @@
|
|||||||
(def pretty-filetypes [:fennel
|
(def pretty-filetypes [:fennel
|
||||||
:clojure])
|
:clojure])
|
||||||
|
|
||||||
(each [_ ftype (pairs pretty-filetypes)]
|
; (each [_ ftype (pairs pretty-filetypes)]
|
||||||
(nvim.ex.autocmd :FileType ftype :call "SetupConceals()"))
|
; (nvim.ex.autocmd :FileType ftype :call "SetupConceals()"))
|
||||||
|
;
|
||||||
|
|||||||
@@ -25,7 +25,8 @@
|
|||||||
:nvim_lsp true
|
:nvim_lsp true
|
||||||
:nvim_lua true
|
:nvim_lua true
|
||||||
:conjure true
|
:conjure true
|
||||||
:vsnip true}})))
|
:vsnip true
|
||||||
|
:vim_dadbod_completion true}})))
|
||||||
|
|
||||||
(nvim.ex.inoremap "<silent><expr> <C-Space> compe#complete()")
|
(nvim.ex.inoremap "<silent><expr> <C-Space> compe#complete()")
|
||||||
(nvim.ex.inoremap "<silent><expr> <CR> compe#confirm('<CR>')")
|
(nvim.ex.inoremap "<silent><expr> <CR> compe#confirm('<CR>')")
|
||||||
|
|||||||
@@ -38,10 +38,12 @@
|
|||||||
:K "lua vim.lsp.buf.hover()"
|
:K "lua vim.lsp.buf.hover()"
|
||||||
"[g" "lua vim.lsp.diagnostic.goto_prev()"
|
"[g" "lua vim.lsp.diagnostic.goto_prev()"
|
||||||
"]g" "lua vim.lsp.diagnostic.goto_prev()"
|
"]g" "lua vim.lsp.diagnostic.goto_prev()"
|
||||||
:<leader>ca "lua vim.lsp.buf.codeaction()"
|
:<c-k> "lua vim.lsp.buf.signature_help()"
|
||||||
|
:<leader>ca "lua vim.lsp.buf.code_action()"
|
||||||
|
:<leader>cl "lua vim.lsp.codelens.run()"
|
||||||
:<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.formattting_sync()"
|
:<leader>fa "lua vim.lsp.buf.formatting_sync()"
|
||||||
})
|
})
|
||||||
|
|
||||||
(def client-nmappings
|
(def client-nmappings
|
||||||
@@ -67,7 +69,7 @@
|
|||||||
(nbufmap mapping cmd))
|
(nbufmap mapping cmd))
|
||||||
|
|
||||||
; x mode mappings
|
; x mode mappings
|
||||||
(xbufmap :<leader>fa "lua vim.lsp.buf.formattting_sync()")
|
(xbufmap :<leader>fa "lua vim.lsp.buf.formatting_sync()")
|
||||||
|
|
||||||
; -- buf_set_keymap('n', 'gs', '<Cmd>lua vim.lsp.buf.document_symbol()<CR>', opts)
|
; -- buf_set_keymap('n', 'gs', '<Cmd>lua vim.lsp.buf.document_symbol()<CR>', opts)
|
||||||
; -- buf_set_keymap('n', 'gS', '<Cmd>lua vim.lsp.buf.workspace_symbol()<CR>', opts)
|
; -- buf_set_keymap('n', 'gS', '<Cmd>lua vim.lsp.buf.workspace_symbol()<CR>', opts)
|
||||||
@@ -83,6 +85,7 @@
|
|||||||
|
|
||||||
(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()")
|
||||||
|
|
||||||
; 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(0), vim.api.nvim_win_get_cursor(0)[1], vim.api.nvim_win_get_cursor(0)[2]}, title = 'Clean Namespace'})]]
|
||||||
|
|||||||
@@ -6,9 +6,10 @@
|
|||||||
(telescope.setup
|
(telescope.setup
|
||||||
{:defaults
|
{:defaults
|
||||||
{:vimgrep_arguments ["ag" "--nocolor" "--noheading"
|
{:vimgrep_arguments ["ag" "--nocolor" "--noheading"
|
||||||
"--files-with-matches" "--number" "--column"
|
"--number" "--column"
|
||||||
"--smart-case" "--hidden" "--follow" "--skip-vcs-ignores"
|
"--smart-case" "--hidden" "--follow" "--skip-vcs-ignores"
|
||||||
"-g" "!.git/"]}})
|
; "-g" "!.git/"
|
||||||
|
]}})
|
||||||
|
|
||||||
|
|
||||||
(util.lnnoremap :ff "Telescope git_files hidden=true")
|
(util.lnnoremap :ff "Telescope git_files hidden=true")
|
||||||
|
|||||||
@@ -58,6 +58,10 @@
|
|||||||
:tpope/vim-vinegar {}
|
:tpope/vim-vinegar {}
|
||||||
:wbthomason/packer.nvim {:mod :packer}
|
:wbthomason/packer.nvim {:mod :packer}
|
||||||
:junegunn/vim-easy-align {:mod :easyalign}
|
:junegunn/vim-easy-align {:mod :easyalign}
|
||||||
|
|
||||||
|
:tpope/vim-dadbod {}
|
||||||
|
:kristijanhusak/vim-dadbod-ui {}
|
||||||
|
:kristijanhusak/vim-dadbod-completion {}
|
||||||
; :luochen1990/rainbow {}
|
; :luochen1990/rainbow {}
|
||||||
; :thecontinium/asyncomplete-conjure.vim {}
|
; :thecontinium/asyncomplete-conjure.vim {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user