mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-11-06 03:12:24 +00:00
asdf
This commit is contained in:
parent
bb8ed61cdc
commit
4b9ab46ce7
5 changed files with 61 additions and 26 deletions
|
@ -15,7 +15,7 @@
|
||||||
(fn [x]
|
(fn [x]
|
||||||
(print (fennel.view 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
|
:separator visible
|
||||||
:indicator_selected {:guibg colors.neutral_aqua :guifg colors.neutral_aqua}}}))
|
:indicator_selected {:guibg colors.neutral_aqua :guifg colors.neutral_aqua}}}))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,10 +9,13 @@
|
||||||
(utils.noremap :n :<leader> ":<c-u>WhichKey '<Space>'<CR>")
|
(utils.noremap :n :<leader> ":<c-u>WhichKey '<Space>'<CR>")
|
||||||
(utils.noremap :v :<leader> ":<c-u>WhichKeyVisual '<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 :<CR> "compe#confirm(lexima#expand('<LT>CR>', 'i'))")
|
||||||
|
|
||||||
|
(utils.mapexpr :i :<C-Space> "compe#complete()")
|
||||||
(utils.mapexpr :i :<esc> "compe#close('<esc>')")
|
(utils.mapexpr :i :<esc> "compe#close('<esc>')")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(fn le [s] (.. ":call luaeval(\"" s "\")"))
|
(fn le [s] (.. ":call luaeval(\"" s "\")"))
|
||||||
|
|
||||||
(set nvim.g.which_key_map {})
|
(set nvim.g.which_key_map {})
|
||||||
|
@ -50,8 +53,8 @@
|
||||||
"e" [ (le "vim.lsp.diagnostic.goto_next()") "Jump to the next error"]
|
"e" [ (le "vim.lsp.diagnostic.goto_next()") "Jump to the next error"]
|
||||||
"g" [ (le "vim.lsp.buf.definition()") "go to definition"]
|
"g" [ (le "vim.lsp.buf.definition()") "go to definition"]
|
||||||
"i" [ (le "vim.lsp.buf.implementation()") "show implementation"]
|
"i" [ (le "vim.lsp.buf.implementation()") "show implementation"]
|
||||||
"r" [ (le "vim.lsp.buf.references()") "show references"]
|
;"r" [ (le "vim.lsp.buf.references()") "show references"]
|
||||||
;"r" [ ":Telescope lsp_references" "show references"]
|
"r" [ ":Telescope lsp_references" "show references"]
|
||||||
"f" [ (le "vim.lsp.buf.formatting()") "format file"]}
|
"f" [ (le "vim.lsp.buf.formatting()") "format file"]}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,23 +15,23 @@
|
||||||
(local colors (utils.colors))
|
(local colors (utils.colors))
|
||||||
|
|
||||||
(local modes
|
(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}}
|
:i { :text "INSERT" :colors { :bg colors.neutral_yellow :fg colors.dark0}}
|
||||||
:c { :text "CMD" :colors { :bg colors.neutral_aqua :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}}
|
:ce { :text "NORMEX" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
|
||||||
:cv { :text "EX" :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}}
|
:ic { :text "INSCOMP" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
|
||||||
:no { :text "OP-PENDING" :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 "HIT-ENTER" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
|
||||||
:r? { :text "CONFIRM" :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}}
|
:R { :text "REPLACE" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
|
||||||
:Rv { :text "VIRTUAL" :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}}
|
||||||
: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}}
|
: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" :colors { :bg colors.neutral_blue :fg colors.dark0}}
|
||||||
:V { :text "VISUAL LINE" :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}}})
|
"" { :text "VISUAL BLOCK" :colors { :bg colors.neutral_blue :fg colors.dark0}}})
|
||||||
|
|
||||||
|
|
||||||
(fn buf-empty? []
|
(fn buf-empty? []
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
fennel aniseed.fennel
|
fennel aniseed.fennel
|
||||||
nvim aniseed.nvim
|
nvim aniseed.nvim
|
||||||
lsp lspconfig
|
lsp lspconfig
|
||||||
|
lsp-configs lspconfig.configs
|
||||||
saga lspsaga
|
saga lspsaga
|
||||||
utils utils
|
utils utils
|
||||||
compe compe}
|
compe compe}
|
||||||
|
@ -26,17 +27,47 @@
|
||||||
false))))
|
false))))
|
||||||
|
|
||||||
|
|
||||||
(lsp.rust_analyzer.setup { :on_attach on_attach})
|
(fn better_root_pattern [patterns except-patterns]
|
||||||
(lsp.jsonls.setup { :on_attach on_attach })
|
"match path if one of the given patterns is matched, EXCEPT if one of the except-patterns is matched"
|
||||||
(lsp.vimls.setup { :on_attach on_attach })
|
(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.tsserver.setup { :on_attach on_attach :root_dir (lsp.util.root_pattern "package.json")})
|
||||||
(lsp.bashls.setup { :on_attach on_attach })
|
(lsp.bashls.setup { :on_attach on_attach })
|
||||||
(lsp.html.setup { :on_attach on_attach})
|
(lsp.html.setup { :on_attach on_attach})
|
||||||
(lsp.denols.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
|
(lsp.hls.setup { :on_attach on_attach
|
||||||
:settings { :languageServerHaskell { :formattingProvider "stylish-haskell"}}})
|
: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
|
(compe.setup
|
||||||
{ :enabled true
|
{ :enabled true
|
||||||
:autocomplete false
|
:autocomplete false
|
||||||
|
|
|
@ -66,7 +66,7 @@ call plug#begin('~/.vim/plugged')
|
||||||
|
|
||||||
Plug 'bhurlow/vim-parinfer'
|
Plug 'bhurlow/vim-parinfer'
|
||||||
|
|
||||||
Plug 'Olical/conjure', {'tag': 'v4.17.0'}
|
"Plug 'Olical/conjure', {'tag': 'v4.17.0'}
|
||||||
|
|
||||||
|
|
||||||
" Language Plugins ----------------------------------------------------- {{{
|
" Language Plugins ----------------------------------------------------- {{{
|
||||||
|
@ -102,6 +102,8 @@ call plug#begin('~/.vim/plugged')
|
||||||
|
|
||||||
|
|
||||||
Plug 'neovim/nvim-lspconfig'
|
Plug 'neovim/nvim-lspconfig'
|
||||||
|
|
||||||
|
"Plug 'nvim-lua/completion-nvim'
|
||||||
Plug 'hrsh7th/nvim-compe'
|
Plug 'hrsh7th/nvim-compe'
|
||||||
Plug 'glepnir/lspsaga.nvim'
|
Plug 'glepnir/lspsaga.nvim'
|
||||||
"Plug 'cohama/lexima.vim'
|
"Plug 'cohama/lexima.vim'
|
||||||
|
|
Loading…
Reference in a new issue