Add vlime

This commit is contained in:
Alexander Rosenberg 2022-12-07 03:39:47 -08:00
parent 01fe92398a
commit c39aa3ddfd
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730
3 changed files with 100 additions and 71 deletions

View File

@ -14,13 +14,17 @@
;; Treesitter ;; Treesitter
(use! :nvim-treesitter/nvim-treesitter (use! :nvim-treesitter/nvim-treesitter
:requires :p00f/nvim-ts-rainbow
:config #(setup! "nvim-treesitter.configs" :config #(setup! "nvim-treesitter.configs"
:ensure_installed :all :ensure_installed :all
:sync_install false :sync_install false
:auto_install true :auto_install true
:highlight { :enable true :highlight { :enable true
:additional_vim_regex_highlighting false } :additional_vim_regex_highlighting false }
:indent { :enable true })) :indent { :enable true }
:rainbow { :enable true
:extended_mode true
:max_file_lines nil }))
;; nightfox.nvim (colorscheme) ;; nightfox.nvim (colorscheme)
(use! :EdenEast/nightfox.nvim (use! :EdenEast/nightfox.nvim
@ -140,6 +144,7 @@
{}) {})
(bind! :n :go find-other.find_other_current_buffer)))) (bind! :n :go find-other.find_other_current_buffer))))
;; illuminate (same symbol highlight)
(use! :RRethy/vim-illuminate (use! :RRethy/vim-illuminate
:config (fn [] :config (fn []
(module-call! :illuminate :configure) (module-call! :illuminate :configure)
@ -157,6 +162,17 @@
:IlluminatedWordText :IlluminatedWordText
{})))) {}))))
;; vlime (lisp environment)
(use! :vlime/vlime
:config (fn []
(set vim.g.vlime_cl_impl :my_sbcl)
(set vim.g.vlime_address [ "127.0.0.1" 52842 ])
(vim.cmd "function! VlimeBuildServerCommandFor_my_sbcl(vlime_loader, vlime_eval)
return [ \"/usr/bin/sbcl\",
\\ \"--load\", a:vlime_loader,
\\ \"--eval\", \"(vlime:main :port 52842)\" ]
endfunction")))
;; Snippy ;; Snippy
(use! :dcampos/nvim-snippy (use! :dcampos/nvim-snippy
:config #(let [map (require :snippy.mapping)] :config #(let [map (require :snippy.mapping)]
@ -169,6 +185,7 @@
:hrsh7th/cmp-path :hrsh7th/cmp-path
:hrsh7th/cmp-cmdline :hrsh7th/cmp-cmdline
:hrsh7th/cmp-nvim-lsp :hrsh7th/cmp-nvim-lsp
:HiPhish/nvim-cmp-vlime
{ 1 :ray-x/cmp-treesitter { 1 :ray-x/cmp-treesitter
:after :nvim-cmp } :after :nvim-cmp }
:dcampos/cmp-snippy ] :dcampos/cmp-snippy ]

View File

@ -50,13 +50,13 @@
:treesitter "[TS]" :treesitter "[TS]"
:snippy "[Snippy]" :snippy "[Snippy]"
:buffer "[Buffer]" :buffer "[Buffer]"
:path "[Path]" } :path "[Path]"
:vlime "[Vlime]" }
entry.source.name)) entry.source.name))
vim_item) vim_item)
} }
:sources [{ :name "nvim_lsp" :priority 2 :group 1 } :sources [{ :name "snippy" :priority 2 :group 1 }
{ :name "snippy" :priority 2 :group 2 } { :name "treesitter" :priority 1 :group 2 }
{ :name "treesitter" :priority 1 :group 3 }
{ :name "buffer" :priority 0 :group 3 } { :name "buffer" :priority 0 :group 3 }
{ :name "path" :priority 0 :group 4 }] { :name "path" :priority 0 :group 4 }]
:view { :view {
@ -75,6 +75,13 @@
; compare.kind ; compare.kind
; compare.length ; compare.length
]}}) ]}})
(cmp.setup.filetype [ :lisp ]
{ :option { :fuzzy false }
:sources
[{ :name "vlime" :priority 2 :group 1 }
{ :name "snippy" :priority 2 :group 2 }
{ :name "buffer" :priority 0 :group 3 }
{ :name "path" :priority 0 :group 4 }]})
(cmp.setup.cmdline "/" (cmp.setup.cmdline "/"
{ :mapping (cmp.mapping.preset.cmdline) { :mapping (cmp.mapping.preset.cmdline)
:sources (cmp.config.sources :sources (cmp.config.sources

View File

@ -3,6 +3,11 @@
(import-macros {: bind!} :macros) (import-macros {: bind!} :macros)
(fn on-attach [_ buf] (fn on-attach [_ buf]
((. (. (require :cmp) :setup) :buffer) {
:sources [{ :name "nvim_lsp" :priority 1 :group 1 }
{ :name "snippy" :priority 1 :group 2 }
{ :name "buffer" :priority 0 :group 3 }
{ :name "path" :priority 0 :group 4 }]})
(bind! :n :gD vim.lsp.buf.declaration buf) (bind! :n :gD vim.lsp.buf.declaration buf)
(bind! :n :gd vim.lsp.buf.definition buf) (bind! :n :gd vim.lsp.buf.definition buf)
(bind! :n :K vim.lsp.buf.hover buf) (bind! :n :K vim.lsp.buf.hover buf)