mirror of
https://github.com/stevenproctor/dotfiles.git
synced 2026-01-28 14:39:54 -06:00
continuing dotfiles migration/setup
This commit is contained in:
33
nvim/.config/nvim/fnl/dotfiles/plugin/compe.fnl
Normal file
33
nvim/.config/nvim/fnl/dotfiles/plugin/compe.fnl
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
(module dotfiles.plugin.compe
|
||||||
|
{autoload {nvim aniseed.nvim}})
|
||||||
|
|
||||||
|
(set nvim.o.completeopt "menuone,noselect")
|
||||||
|
|
||||||
|
(let [compe (require :compe)]
|
||||||
|
(when compe
|
||||||
|
(compe.setup
|
||||||
|
{:enabled true
|
||||||
|
:autocomplete true
|
||||||
|
:debug false
|
||||||
|
:min_length 1
|
||||||
|
:preselect "enable"
|
||||||
|
:throttle_time 80
|
||||||
|
:source_timeout 200
|
||||||
|
:incomplete_delay 400
|
||||||
|
:max_abbr_width 100
|
||||||
|
:max_kind_width 100
|
||||||
|
:max_menu_width 100
|
||||||
|
:documentation true
|
||||||
|
:source {:path true
|
||||||
|
:buffer true
|
||||||
|
:calc true
|
||||||
|
:nvim_lsp true
|
||||||
|
:nvim_lua true
|
||||||
|
:conjure true
|
||||||
|
:vsnip true}})))
|
||||||
|
|
||||||
|
(nvim.ex.inoremap "<silent><expr> <C-Space> compe#complete()")
|
||||||
|
(nvim.ex.inoremap "<silent><expr> <CR> compe#confirm('<CR>')")
|
||||||
|
(nvim.ex.inoremap "<silent><expr> <C-e> compe#close('<C-e>')")
|
||||||
|
(nvim.ex.inoremap "<silent><expr> <C-f> compe#scroll({ 'delta': +4 })")
|
||||||
|
(nvim.ex.inoremap "<silent><expr> <C-d> compe#scroll({ 'delta': -4 })")
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
{a aniseed.core
|
{a aniseed.core
|
||||||
u dotfiles.util
|
u dotfiles.util
|
||||||
nvim aniseed.nvim
|
nvim aniseed.nvim
|
||||||
|
nu aniseed.nvim.util
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -34,6 +35,23 @@
|
|||||||
; -- vim.lsp.buf.execute_command({command = cmd, arguments = arguments})
|
; -- vim.lsp.buf.execute_command({command = cmd, arguments = arguments})
|
||||||
; -- end
|
; -- end
|
||||||
|
|
||||||
|
(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]
|
||||||
|
]
|
||||||
|
(vim.lsp.buf.execute_command {:command cmd
|
||||||
|
:arguments (merge args {...})})
|
||||||
|
))
|
||||||
|
|
||||||
|
|
||||||
|
(nu.fn-bridge :LspExecuteCommand :dotfiles.plugin.lspconfig :lsp-execute-command {:return false})
|
||||||
|
|
||||||
|
; (nu.fn-bridge
|
||||||
|
; :DeleteHiddenBuffers
|
||||||
|
; :dotfiles.mapping :delete-hidden-buffers)
|
||||||
|
|
||||||
(def core-nmappings
|
(def core-nmappings
|
||||||
{
|
{
|
||||||
@@ -54,6 +72,7 @@
|
|||||||
{:clojure
|
{:clojure
|
||||||
{
|
{
|
||||||
; -- buf_set_keymap('n', '<leader>cn', "<cmd>lua LspExecuteCommand('clean-ns')<CR>", opts)
|
; -- buf_set_keymap('n', '<leader>cn', "<cmd>lua LspExecuteCommand('clean-ns')<CR>", opts)
|
||||||
|
; -- buf_set_keymap('n', '<leader>cn', "<cmd>lua LspExecuteCommand('clean-ns')<CR>", opts)
|
||||||
; -- buf_set_keymap('n', '<leader>ref', "<cmd>lua LspExecuteCommand('extract-function', vim.api.nvim_eval(\"input('Function name: ')\"))<CR>", opts)
|
; -- buf_set_keymap('n', '<leader>ref', "<cmd>lua LspExecuteCommand('extract-function', vim.api.nvim_eval(\"input('Function name: ')\"))<CR>", opts)
|
||||||
; -- buf_set_keymap('x', '<leader>ref', "<cmd>lua LspExecuteCommand('extract-function', vim.api.nvim_eval(\"input('Function name: ')\"))<CR>", opts)
|
; -- buf_set_keymap('x', '<leader>ref', "<cmd>lua LspExecuteCommand('extract-function', vim.api.nvim_eval(\"input('Function name: ')\"))<CR>", opts)
|
||||||
; -- buf_set_keymap('n', '<leader>id', "<cmd>lua LspExecuteCommand('inline-symbol')<CR>", opts)
|
; -- buf_set_keymap('n', '<leader>id', "<cmd>lua LspExecuteCommand('inline-symbol')<CR>", opts)
|
||||||
@@ -91,6 +110,7 @@
|
|||||||
|
|
||||||
|
|
||||||
(bind-client-mappings client)
|
(bind-client-mappings client)
|
||||||
|
(nvim.ex.autocmd :BufWritePre :<buffer> :lua "vim.lsp.buf.formatting_sync()")
|
||||||
; -- vim.api.nvim_command[[autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()]]
|
; -- vim.api.nvim_command[[autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()]]
|
||||||
; -- 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'})]]
|
||||||
|
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
|
|
||||||
(telescope.setup
|
(telescope.setup
|
||||||
{:defaults
|
{:defaults
|
||||||
{:vimgrep_arguments ["ag" "--nocolor=never" "--noheading"
|
{:vimgrep_arguments ["ag" "--nocolor" "--noheading"
|
||||||
"--files-with-matches" "--number" "--column"
|
"--files-with-matches" "--number" "--column"
|
||||||
"--smart-case" "--hidden" "--follow"
|
"--smart-case" "--hidden" "--follow" "--skip-vcs-ignores"
|
||||||
"-g" "!.git/"]}})
|
"-g" "!.git/"]}})
|
||||||
|
|
||||||
|
|
||||||
(util.lnnoremap :ff "Telescope find_files hidden=true")
|
(util.lnnoremap :ff "Telescope git_files hidden=true")
|
||||||
(util.lnnoremap :f- "Telescope file_browser")
|
(util.lnnoremap :f- "Telescope file_browser")
|
||||||
(util.lnnoremap :fg "Telescope live_grep")
|
(util.lnnoremap :fg "Telescope live_grep")
|
||||||
(util.lnnoremap :* "Telescope grep_string")
|
(util.lnnoremap :* "Telescope grep_string")
|
||||||
|
|||||||
@@ -28,35 +28,37 @@
|
|||||||
|
|
||||||
(def- packages
|
(def- packages
|
||||||
{
|
{
|
||||||
:wbthomason/packer.nvim {:mod :packer}
|
:Olical/aniseed {}
|
||||||
|
:Olical/conjure {} ; Clojure
|
||||||
|
:Olical/fennel.vim {} ; Fennel
|
||||||
|
: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
|
||||||
:thecontinium/asyncomplete-conjure.vim {}
|
|
||||||
:tpope/vim-dispatch {} ; Conjure support - jack-in with nrepl dependencies
|
|
||||||
:Olical/conjure {} ; Clojure
|
|
||||||
:Olical/aniseed {}
|
|
||||||
:Olical/fennel.vim {} ; Fennel
|
|
||||||
:neovim/nvim-lspconfig {:mod :lspconfig} ; NeoVim lsp config
|
|
||||||
:kabouzeid/nvim-lspinstall {} ; NeoVim lsp server installs
|
|
||||||
:airblade/vim-gitgutter {} ; Git
|
|
||||||
:kovisoft/paredit {}
|
|
||||||
; :luochen1990/rainbow {}
|
|
||||||
:jiangmiao/auto-pairs {} ; backets, parens, and quotes in pairs
|
|
||||||
:nvim-treesitter/nvim-treesitter {:run ":TSUpdate" :mod :treesitter}
|
|
||||||
:hashivim/vim-terraform {} ; Terraform
|
:hashivim/vim-terraform {} ; Terraform
|
||||||
|
:hrsh7th/nvim-compe {:mod :compe} ; autocomplete
|
||||||
|
:jiangmiao/auto-pairs {} ; backets, parens, and quotes in pairs
|
||||||
|
:kabouzeid/nvim-lspinstall {} ; NeoVim lsp server installs
|
||||||
|
:kovisoft/paredit {}
|
||||||
|
:neovim/nvim-lspconfig {:mod :lspconfig} ; NeoVim lsp config
|
||||||
|
:norcalli/nvim-colorizer.lua {:mode :colorizer}
|
||||||
|
:nvim-telescope/telescope.nvim {:requires [[:nvim-lua/popup.nvim] [:nvim-lua/plenary.nvim]] :mod :telescope}
|
||||||
|
:nvim-treesitter/nvim-treesitter {:run ":TSUpdate" :mod :treesitter}
|
||||||
|
:p00f/nvim-ts-rainbow {}
|
||||||
|
:radenling/vim-dispatch-neovim {} ; Clojure
|
||||||
:skywind3000/asyncrun.vim {} ; :AsyncRun
|
:skywind3000/asyncrun.vim {} ; :AsyncRun
|
||||||
|
:tami5/compe-conjure {} ; autocomplete using conjure as a source
|
||||||
:tpope/vim-classpath {}
|
:tpope/vim-classpath {}
|
||||||
|
:tpope/vim-dispatch {} ; Conjure support - jack-in with nrepl dependencies
|
||||||
:tpope/vim-fugitive {} ; Git
|
:tpope/vim-fugitive {} ; Git
|
||||||
:tpope/vim-git {} ; Git Commit Message
|
:tpope/vim-git {} ; Git Commit Message
|
||||||
:tpope/vim-pathogen {}
|
:tpope/vim-pathogen {}
|
||||||
:tpope/vim-surround {}
|
|
||||||
:tpope/vim-repeat {}
|
:tpope/vim-repeat {}
|
||||||
|
:tpope/vim-surround {}
|
||||||
:tpope/vim-unimpaired {}
|
:tpope/vim-unimpaired {}
|
||||||
:tpope/vim-vinegar {}
|
:tpope/vim-vinegar {}
|
||||||
:radenling/vim-dispatch-neovim {} ; Clojure
|
:wbthomason/packer.nvim {:mod :packer}
|
||||||
:nvim-telescope/telescope.nvim {:requires [[:nvim-lua/popup.nvim] [:nvim-lua/plenary.nvim]] :mod :telescope}
|
; :luochen1990/rainbow {}
|
||||||
:p00f/nvim-ts-rainbow {}
|
; :thecontinium/asyncomplete-conjure.vim {}
|
||||||
:norcalli/nvim-colorizer.lua {:mode :colorizer}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
; :tpope/vim-fireplace {} ; Clojure
|
; :tpope/vim-fireplace {} ; Clojure
|
||||||
|
|||||||
Reference in New Issue
Block a user