This commit is contained in:
elkowar 2021-04-22 16:00:33 +02:00
parent bb8ed61cdc
commit 4b9ab46ce7
5 changed files with 61 additions and 26 deletions

View file

@ -15,7 +15,7 @@
(fn [x]
(print (fennel.view x))))
(set nvim.g.conjure#client#fennel#aniseed#aniseed_module_prefix "aniseed.")
;(set nvim.g.conjure#client#fennel#aniseed#aniseed_module_prefix "aniseed.")
@ -52,4 +52,3 @@
:separator visible
:indicator_selected {:guibg colors.neutral_aqua :guifg colors.neutral_aqua}}}))

View file

@ -9,10 +9,13 @@
(utils.noremap :n :<leader> ":<c-u>WhichKey '<Space>'<CR>")
(utils.noremap :v :<leader> ":<c-u>WhichKeyVisual '<Space>'<CR>")
(utils.mapexpr :i :<C-Space> "compe#complete()")
;(utils.mapexpr :i :<CR> "compe#confirm(lexima#expand('<LT>CR>', 'i'))")
(utils.mapexpr :i :<C-Space> "compe#complete()")
(utils.mapexpr :i :<esc> "compe#close('<esc>')")
(fn le [s] (.. ":call luaeval(\"" s "\")"))
(set nvim.g.which_key_map {})
@ -50,8 +53,8 @@
"e" [ (le "vim.lsp.diagnostic.goto_next()") "Jump to the next error"]
"g" [ (le "vim.lsp.buf.definition()") "go to definition"]
"i" [ (le "vim.lsp.buf.implementation()") "show implementation"]
"r" [ (le "vim.lsp.buf.references()") "show references"]
;"r" [ ":Telescope lsp_references" "show references"]
;"r" [ (le "vim.lsp.buf.references()") "show references"]
"r" [ ":Telescope lsp_references" "show references"]
"f" [ (le "vim.lsp.buf.formatting()") "format file"]}

View file

@ -15,23 +15,23 @@
(local colors (utils.colors))
(local modes
{ :n { :text "NORMAL" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
{ :n { :text "NORMAL" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:i { :text "INSERT" :colors { :bg colors.neutral_yellow :fg colors.dark0}}
:c { :text "CMD" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:ce { :text "NORMEX" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:cv { :text "EX" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:ic { :text "INSCOMP" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:no { :text "OP-PENDING" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:r { :text "HIT-ENTER" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:r? { :text "CONFIRM" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:R { :text "REPLACE" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:Rv { :text "VIRTUAL" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:s { :text "SELECT" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:S { :text "SELECT" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:t { :text "TERM" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:v { :text "VISUAL" :colors { :bg colors.neutral_blue :fg colors.dark0}}
:V { :text "VISUAL LINE" :colors { :bg colors.neutral_blue :fg colors.dark0}}
"" { :text "VISUAL BLOCK" :colors { :bg colors.neutral_blue :fg colors.dark0}}})
:c { :text "CMD" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:ce { :text "NORMEX" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:cv { :text "EX" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:ic { :text "INSCOMP" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:no { :text "OP-PENDING" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:r { :text "HIT-ENTER" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:r? { :text "CONFIRM" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:R { :text "REPLACE" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:Rv { :text "VIRTUAL" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:s { :text "SELECT" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:S { :text "SELECT" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:t { :text "TERM" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
:v { :text "VISUAL" :colors { :bg colors.neutral_blue :fg colors.dark0}}
:V { :text "VISUAL LINE" :colors { :bg colors.neutral_blue :fg colors.dark0}}
"" { :text "VISUAL BLOCK" :colors { :bg colors.neutral_blue :fg colors.dark0}}})
(fn buf-empty? []

View file

@ -3,6 +3,7 @@
fennel aniseed.fennel
nvim aniseed.nvim
lsp lspconfig
lsp-configs lspconfig.configs
saga lspsaga
utils utils
compe compe}
@ -26,17 +27,47 @@
false))))
(lsp.rust_analyzer.setup { :on_attach on_attach})
(lsp.jsonls.setup { :on_attach on_attach })
(lsp.vimls.setup { :on_attach on_attach })
(fn better_root_pattern [patterns except-patterns]
"match path if one of the given patterns is matched, EXCEPT if one of the except-patterns is matched"
(fn [path]
(when (not ((lsp.util.root_pattern except-patterns) path))
((lsp.util.root_pattern patterns) path))))
(local capabilities (vim.lsp.protocol.make_client_capabilities))
(set capabilities.textDocument.completion.completionItem.snippetSupport true)
(set capabilities.textDocument.completion.completionItem.resolveSupport
{ :properties ["documentation" "detail" "additionalTextEdits"]})
(lsp.rust_analyzer.setup { :on_attach on_attach
:capabilities capabilities})
(lsp.vimls.setup { :on_attach on_attach})
(lsp.tsserver.setup { :on_attach on_attach :root_dir (lsp.util.root_pattern "package.json")})
(lsp.bashls.setup { :on_attach on_attach })
(lsp.html.setup { :on_attach on_attach})
(lsp.denols.setup { :on_attach on_attach
:root_dir (lsp.util.root_pattern ".git")})
:root_dir (better_root_pattern [".git"] ["package.json"])})
(lsp.hls.setup { :on_attach on_attach
:settings { :languageServerHaskell { :formattingProvider "stylish-haskell"}}})
(lsp.jsonls.setup
{ :on_attach on_attach
:commands { :Format [ (fn [] (vim.lsp.buf.range_formatting [] [0 0] [(vim.fn.line "$") 0]))]}})
(when (not lsp.erlangls)
(set lsp-configs.erlangls
{ :default_config
{ :cmd ["erlang_ls"]
:filetypes ["lua"]
:root_dir (lsp.util.root_pattern "rebar.config")
:settings {}}}))
(lsp.erlangls.setup {})
(compe.setup
{ :enabled true
:autocomplete false

View file

@ -66,7 +66,7 @@ call plug#begin('~/.vim/plugged')
Plug 'bhurlow/vim-parinfer'
Plug 'Olical/conjure', {'tag': 'v4.17.0'}
"Plug 'Olical/conjure', {'tag': 'v4.17.0'}
" Language Plugins ----------------------------------------------------- {{{
@ -102,6 +102,8 @@ call plug#begin('~/.vim/plugged')
Plug 'neovim/nvim-lspconfig'
"Plug 'nvim-lua/completion-nvim'
Plug 'hrsh7th/nvim-compe'
Plug 'glepnir/lspsaga.nvim'
"Plug 'cohama/lexima.vim'