mirror of
https://github.com/stevenproctor/dotfiles.git
synced 2026-01-28 08:39:56 -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
|
||||
u dotfiles.util
|
||||
nvim aniseed.nvim
|
||||
nu aniseed.nvim.util
|
||||
}
|
||||
})
|
||||
|
||||
@@ -34,6 +35,23 @@
|
||||
; -- vim.lsp.buf.execute_command({command = cmd, arguments = arguments})
|
||||
; -- 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
|
||||
{
|
||||
@@ -54,6 +72,7 @@
|
||||
{: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>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)
|
||||
@@ -91,6 +110,7 @@
|
||||
|
||||
|
||||
(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_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
|
||||
{:defaults
|
||||
{:vimgrep_arguments ["ag" "--nocolor=never" "--noheading"
|
||||
{:vimgrep_arguments ["ag" "--nocolor" "--noheading"
|
||||
"--files-with-matches" "--number" "--column"
|
||||
"--smart-case" "--hidden" "--follow"
|
||||
"--smart-case" "--hidden" "--follow" "--skip-vcs-ignores"
|
||||
"-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 :fg "Telescope live_grep")
|
||||
(util.lnnoremap :* "Telescope grep_string")
|
||||
|
||||
@@ -28,35 +28,37 @@
|
||||
|
||||
(def- packages
|
||||
{
|
||||
:wbthomason/packer.nvim {:mod :packer}
|
||||
:Olical/aniseed {}
|
||||
:Olical/conjure {} ; Clojure
|
||||
:Olical/fennel.vim {} ; Fennel
|
||||
:airblade/vim-gitgutter {} ; Git
|
||||
:airblade/vim-gitgutter {} ; Git
|
||||
: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
|
||||
: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
|
||||
: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
|
||||
:skywind3000/asyncrun.vim {} ; :AsyncRun
|
||||
:tpope/vim-classpath {}
|
||||
:tpope/vim-fugitive {} ; Git
|
||||
:tpope/vim-git {} ; Git Commit Message
|
||||
:tpope/vim-pathogen {}
|
||||
:tpope/vim-surround {}
|
||||
:tpope/vim-repeat {}
|
||||
:tpope/vim-unimpaired {}
|
||||
:tpope/vim-vinegar {}
|
||||
:radenling/vim-dispatch-neovim {} ; Clojure
|
||||
:nvim-telescope/telescope.nvim {:requires [[:nvim-lua/popup.nvim] [:nvim-lua/plenary.nvim]] :mod :telescope}
|
||||
:p00f/nvim-ts-rainbow {}
|
||||
:norcalli/nvim-colorizer.lua {:mode :colorizer}
|
||||
: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
|
||||
:tami5/compe-conjure {} ; autocomplete using conjure as a source
|
||||
:tpope/vim-classpath {}
|
||||
:tpope/vim-dispatch {} ; Conjure support - jack-in with nrepl dependencies
|
||||
:tpope/vim-fugitive {} ; Git
|
||||
:tpope/vim-git {} ; Git Commit Message
|
||||
:tpope/vim-pathogen {}
|
||||
:tpope/vim-repeat {}
|
||||
:tpope/vim-surround {}
|
||||
:tpope/vim-unimpaired {}
|
||||
:tpope/vim-vinegar {}
|
||||
:wbthomason/packer.nvim {:mod :packer}
|
||||
; :luochen1990/rainbow {}
|
||||
; :thecontinium/asyncomplete-conjure.vim {}
|
||||
}
|
||||
|
||||
; :tpope/vim-fireplace {} ; Clojure
|
||||
|
||||
Reference in New Issue
Block a user