Compare commits
No commits in common. "a8706ae56e0d9b98fa33ee0c4143b688630344c9" and "766fd78e815060b3dfd839d3d346bcbdd77dead5" have entirely different histories.
a8706ae56e
...
766fd78e81
32
fnl/lsp.fnl
32
fnl/lsp.fnl
@ -1,9 +1,8 @@
|
||||
(module user.lsp
|
||||
{require {nvim aniseed.nvim}})
|
||||
|
||||
(local lspconfig (require :lspconfig))
|
||||
(local treesitter (require :nvim-treesitter.configs))
|
||||
(local cmp (require :cmp))
|
||||
(global lspconfig (require :lspconfig))
|
||||
(global treesitter (require :nvim-treesitter.configs))
|
||||
|
||||
(nvim.set_keymap "" :gd "<cmd>lua vim.lsp.buf.definition()<CR>" {:silent true :noremap true})
|
||||
(nvim.set_keymap "" :gh "<cmd>lua vim.lsp.buf.hover()<CR>" {:silent true :noremap true})
|
||||
@ -34,29 +33,4 @@
|
||||
:swap_next {:<S-l> "@parameter.inner"}
|
||||
:swap_previous {:<S-h> "@parameter.inner"}}}})
|
||||
|
||||
;; completion
|
||||
(set nvim.o.completeopt "menu,menuone,noselect")
|
||||
|
||||
(def- cmp-src-menu-items
|
||||
{:buffer "buffer"
|
||||
:nvim_lsp "lsp"
|
||||
:path "path"})
|
||||
|
||||
(def- cmp-srcs
|
||||
[{:name :nvim_lsp}
|
||||
{:name :path}
|
||||
{:name :buffer}])
|
||||
|
||||
(cmp.setup {:formatting
|
||||
{:format (fn [entry item]
|
||||
(set item.menu (or (. cmp-src-menu-items entry.source.name) ""))
|
||||
item)}
|
||||
:mapping {:<S-k> (cmp.mapping.select_prev_item)
|
||||
:<S-j> (cmp.mapping.select_next_item)
|
||||
; :<C-b> (cmp.mapping.scroll_docs (- 4))
|
||||
; :<C-f> (cmp.mapping.scroll_docs 4)
|
||||
; :<C-Space> (cmp.mapping.complete)
|
||||
; :<C-e> (cmp.mapping.close)
|
||||
:<CR> (cmp.mapping.confirm {:behavior cmp.ConfirmBehavior.Insert
|
||||
:select true})}
|
||||
:sources cmp-srcs})
|
||||
(set nvim.o.completeopt "menuone,noselect")
|
||||
|
@ -12,6 +12,7 @@
|
||||
; ui
|
||||
(use :kyazdani42/nvim-web-devicons)
|
||||
(use :nvim-lualine/lualine.nvim)
|
||||
(use :junegunn/goyo.vim)
|
||||
(use :lukas-reineke/indent-blankline.nvim)
|
||||
(use :ntpeters/vim-better-whitespace)
|
||||
(use :valloric/matchtagalways)
|
||||
@ -21,20 +22,15 @@
|
||||
(use :jeetsukumaran/vim-buffergator)
|
||||
(use :tpope/vim-fugitive)
|
||||
(use :blackCauldron7/surround.nvim)
|
||||
(use :chaoren/vim-wordmotion)
|
||||
(use :b3nj5m1n/kommentary)
|
||||
(use :nelstrom/vim-visual-star-search)
|
||||
|
||||
(use {1 :nvim-treesitter/nvim-treesitter :run ":TSUpdate"})
|
||||
(use :nvim-treesitter/nvim-treesitter-textobjects)
|
||||
(use :hrsh7th/nvim-compe)
|
||||
(use :neovim/nvim-lspconfig)
|
||||
|
||||
; completion
|
||||
(use :hrsh7th/nvim-cmp)
|
||||
(use :hrsh7th/cmp-nvim-lua)
|
||||
(use :hrsh7th/cmp-nvim-lsp)
|
||||
(use :hrsh7th/cmp-buffer)
|
||||
(use :hrsh7th/cmp-path)
|
||||
|
||||
; others
|
||||
(use :wakatime/vim-wakatime)
|
||||
(use {1 :kkoomen/vim-doge :run ":call doge#install()"})))
|
||||
|
@ -9,7 +9,7 @@
|
||||
;; buffergator
|
||||
(set nvim.g.buffergator_display_regime "parentdir")
|
||||
|
||||
;; Vaffle
|
||||
;; nvim tree
|
||||
(defn open-vaffle []
|
||||
(let [bufname (nvim.fn.bufname "%")]
|
||||
(if (= bufname "")
|
||||
@ -19,6 +19,11 @@
|
||||
(nu.fn-bridge :OpenVaffle :user.plugin.settings :open-vaffle)
|
||||
(nvim.set_keymap :n :<leader>dd ":call OpenVaffle()<CR>" {:noremap true :silent true})
|
||||
|
||||
;; vim-operator-surround
|
||||
(nvim.set_keymap "" :sa "<Plug>(operator-surround-append)" {:silent true})
|
||||
(nvim.set_keymap "" :sd "<Plug>(operator-surround-delete)" {:silent true})
|
||||
(nvim.set_keymap "" :sr "<Plug>(operator-surround-replace)" {:silent true})
|
||||
|
||||
;; surround.nvim
|
||||
(global surround (require :surround))
|
||||
(surround.setup
|
||||
|
Loading…
Reference in New Issue
Block a user