This commit is contained in:
elkowar 2021-04-18 12:03:50 +02:00
parent 1a7be45469
commit bb8ed61cdc
6 changed files with 46 additions and 13 deletions

View file

@ -3,11 +3,13 @@
fennel aniseed.fennel fennel aniseed.fennel
nvim aniseed.nvim nvim aniseed.nvim
kb keybinds kb keybinds
utils utils utils utils}
gl plugins.galaxyline
lsp plugins.lsp}
require-macros [macros]}) require-macros [macros]})
(require "plugins.telescope")
(require "plugins.lsp")
(require "plugins.galaxyline")
(global pp (global pp
(fn [x] (fn [x]
@ -49,3 +51,5 @@
:warning_visible visible :warning_visible visible
:separator visible :separator visible
:indicator_selected {:guibg colors.neutral_aqua :guifg colors.neutral_aqua}}})) :indicator_selected {:guibg colors.neutral_aqua :guifg colors.neutral_aqua}}}))

View file

@ -10,7 +10,7 @@
(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 :<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 :<esc> "compe#close('<esc>')") (utils.mapexpr :i :<esc> "compe#close('<esc>')")
(fn le [s] (.. ":call luaeval(\"" s "\")")) (fn le [s] (.. ":call luaeval(\"" s "\")"))
@ -23,6 +23,8 @@
"l" [ ":bnext" "next buffer"] "l" [ ":bnext" "next buffer"]
"f" "which_key_ignore" "f" "which_key_ignore"
"s" "which_key_ignore" "s" "which_key_ignore"
"o" [":Telescope live_grep" "Grep files"]
"p" [":Telescope file_browser" "Open file-browser"]
"[" ["<Plug>(YoinkPostPasteSwapBack)" "Swap last paste backwards"] "[" ["<Plug>(YoinkPostPasteSwapBack)" "Swap last paste backwards"]
"]" ["<Plug>(YoinkPostPasteSwapForward)" "Swap last paste backwards"] "]" ["<Plug>(YoinkPostPasteSwapForward)" "Swap last paste backwards"]
":" [":Commands" "Search command with fzf"] ":" [":Commands" "Search command with fzf"]
@ -49,6 +51,7 @@
"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"]
"f" [ (le "vim.lsp.buf.formatting()") "format file"]} "f" [ (le "vim.lsp.buf.formatting()") "format file"]}

View file

@ -26,17 +26,16 @@
false)))) false))))
(lsp.rust_analyzer.setup { :on_attach on_attach }) (lsp.rust_analyzer.setup { :on_attach on_attach})
(lsp.jsonls.setup { :on_attach on_attach }) (lsp.jsonls.setup { :on_attach on_attach })
(lsp.vimls.setup { :on_attach on_attach }) (lsp.vimls.setup { :on_attach on_attach })
(lsp.tsserver.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.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 (lsp.util.root_pattern ".git")})
(lsp.hls.setup { :on_attach on_attach } (lsp.hls.setup { :on_attach on_attach
:settings { :languageServerHaskell { :formattingProvider "stylish-haskell" }}) :settings { :languageServerHaskell { :formattingProvider "stylish-haskell"}}})
(compe.setup (compe.setup
{ :enabled true { :enabled true
@ -76,5 +75,6 @@
(utils.highlight "LspSagaCodeActionContent" {:fg "#8ec07c"}) (utils.highlight "LspSagaCodeActionContent" {:fg "#8ec07c"})
(utils.highlight "LspSagaFinderSelection" {:fg "#8ec07c"}) (utils.highlight "LspSagaFinderSelection" {:fg "#8ec07c"})
(utils.highlight "LspSagaDiagnosticHeader" {:fg "#8ec07c"}) (utils.highlight "LspSagaDiagnosticHeader" {:fg "#8ec07c"})
(utils.highlight "TargetWord" {:fg "#8ec07c"})
(set nvim.o.signcolumn "yes") (set nvim.o.signcolumn "yes")

17
fnl/plugins/telescope.fnl Normal file
View file

@ -0,0 +1,17 @@
(module plugins.telescope
{require {a aniseed.core
fennel aniseed.fennel
nvim aniseed.nvim
utils utils
telescope telescope
actions telescope.actions}})
(telescope.setup
{:defaults
{:i { "<esc>" actions.close}}})

View file

@ -121,6 +121,11 @@ augroup basics
" file type assignments " file type assignments
autocmd BufRead,BufNewFile *.ddl setlocal filetype=sql autocmd BufRead,BufNewFile *.ddl setlocal filetype=sql
" Auto-close quickfix list after entry is selected
autocmd FileType qf nnoremap <buffer> <CR> <CR>:cclose<CR>
augroup END augroup END
@ -345,10 +350,12 @@ nnoremap ö a
" }}} " }}}
" how 2 highlight group at cursor
":exe 'hi '.synIDattr(synID(line("."), col("."), 0),"name")
"source $VIM_ROOT/whichkeyConfig.vim "source $VIM_ROOT/whichkeyConfig.vim
let g:aniseed#env = v:true let g:aniseed#env = v:true
let g:lexima_no_default_rules = v:true "let g:lexima_no_default_rules = v:true
call lexima#set_default_rules() "call lexima#set_default_rules()

View file

@ -7,6 +7,8 @@ endif
call plug#begin('~/.vim/plugged') call plug#begin('~/.vim/plugged')
Plug 'kevinhwang91/nvim-bqf'
Plug 'akinsho/nvim-bufferline.lua' Plug 'akinsho/nvim-bufferline.lua'
Plug 'Olical/aniseed', { 'tag': 'v3.16.0' } Plug 'Olical/aniseed', { 'tag': 'v3.16.0' }
@ -102,7 +104,7 @@ call plug#begin('~/.vim/plugged')
Plug 'neovim/nvim-lspconfig' Plug 'neovim/nvim-lspconfig'
Plug 'hrsh7th/nvim-compe' Plug 'hrsh7th/nvim-compe'
Plug 'glepnir/lspsaga.nvim' Plug 'glepnir/lspsaga.nvim'
Plug 'cohama/lexima.vim' "Plug 'cohama/lexima.vim'
Plug 'nvim-lua/popup.nvim' Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim' Plug 'nvim-lua/plenary.nvim'