diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/binds.lua | 13 | ||||
| -rw-r--r-- | lua/conftool.lua | 5 | ||||
| -rw-r--r-- | lua/defs.lua | 8 | ||||
| -rw-r--r-- | lua/ide.lua | 21 | ||||
| -rw-r--r-- | lua/keys | 104 | ||||
| -rw-r--r-- | lua/ui.lua | 44 |
6 files changed, 167 insertions, 28 deletions
diff --git a/lua/binds.lua b/lua/binds.lua index 6f00728..c2990f0 100644 --- a/lua/binds.lua +++ b/lua/binds.lua @@ -8,7 +8,7 @@ local defs = require('defs') -- Maps -- -- select all -ct.map('n', '<C-a>', '<esc>ggVG<LF>') +ct.map('n', '<Leader>a', '<esc>ggVG<LF>') --[[ -- spawn terminal ct.map('n', '<C-M-t>', ':!' .. defs.external_term .. ' . &<LF><LF>') @@ -16,11 +16,18 @@ ct.map('n', '<C-M-t>', ':!' .. defs.external_term .. ' . &<LF><LF>') ct.map('n', '<C-M-f>', ':!' .. defs.external_filemgr .. ' . &<LF><LF>') ]] -- spellchecking -ct.map('n', '<C-s>', ':set spell!<LF>') +ct.map('n', '<Leader>s', ':set spell!<LF>') + +-- Buffer Navigation +ct.map('n', '<Leader>w', ':bnext<LF>') +ct.map('n', '<Leader>W', ':bprevious<LF>') + +-- close buffer +ct.map('n', '<Leader>q', ':bd<LF>') -- -- Commands -- ct.defcmd('Xrdb', '!xrdb %') ct.defcmd('ExTerm', '!' .. defs.external_term .. '&<LF><LF>') -ct.defcmd('ExFileMgr', '!' .. defs.external_filemgr .. '&<LF><LF>') +ct.defcmd('ExFileMgr', '!' .. defs.external_filemgr .. '. &<LF><LF>') diff --git a/lua/conftool.lua b/lua/conftool.lua index 864a925..f0b0098 100644 --- a/lua/conftool.lua +++ b/lua/conftool.lua @@ -1,5 +1,10 @@ +-- +-- Configuration tools +-- + local conftool = {} +-- a viml-like set function function conftool.set(...) for _,a in ipairs{...} do if type(a) == "string" then diff --git a/lua/defs.lua b/lua/defs.lua index 92c1918..7d69ee6 100644 --- a/lua/defs.lua +++ b/lua/defs.lua @@ -1,8 +1,8 @@ return { - -- Yes, I use the Gnome desktop environment + -- Yes, I use the Mate desktop environment template_dir = '~/templates', - external_term = 'gnome-terminal', - external_filemgr = 'nautilus', - external_pdfviewer = 'evince', + external_term = 'mate-terminal', + external_filemgr = 'caja', + external_pdfviewer = 'atril', lsp_path = vim.env.HOME .. '/.local/share/lsp_servers' } diff --git a/lua/ide.lua b/lua/ide.lua index 5cea9f6..5496e2a 100644 --- a/lua/ide.lua +++ b/lua/ide.lua @@ -56,7 +56,7 @@ pk_use { -- -- Language Configurations -- -pk_use 'ap/vim-css-color' +-- pk_use 'ap/vim-css-color' -- close tags in html languages pk_use { 'alvan/closetag.vim', @@ -67,7 +67,10 @@ pk_use { ft = 'go' } -pk_use 'udalov/kotlin-vim' +pk_use { + 'udalov/kotlin-vim', + ft = 'kotlin' +} -- -- Language Server @@ -80,10 +83,11 @@ pk_use 'nanotee/nvim-lsp-basics' pk_use { 'stevearc/aerial.nvim', config = function() + require('conftool').map('n', '<Leader>e', ':AerialToggle<LF>') require('aerial').setup({ backends = {'lsp', 'markdown', 'man'}, layout = { - max_width = {25, 0.2} + max_width = 25 } }) end @@ -113,13 +117,6 @@ pk_use { }, config = function() local masonlsp = require 'mason-lspconfig' - masonlsp.setup { - ensure_installed = { - "sumneko_lua", - "gopls", - "vimls" - } - } masonlsp.setup_handlers { function(server_name) require('lspconfig')[server_name].setup(require('coq').lsp_ensure_capabilities { @@ -147,7 +144,7 @@ pk_use { 'folke/trouble.nvim', config = function() require('trouble').setup { - height = 5, + height = 6, icons = false, fold_open = "v", fold_closed = ">", @@ -160,7 +157,7 @@ pk_use { use_diagnostic_signs = false } - require('conftool').map('n', '<C-S-`>', ':TroubleToggle<CR>') + require('conftool').map('n', '<Leader>t', ':TroubleToggle<CR>') end } diff --git a/lua/keys b/lua/keys new file mode 100644 index 0000000..5234549 --- /dev/null +++ b/lua/keys @@ -0,0 +1,104 @@ + + + +n !> ~/keys +x # * y?\V<C-R>"<CR> + Nvim builtin + Last set from Lua +o % <Plug>(MatchitOperationForward) + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 73 +x % <Plug>(MatchitVisualForward) + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 71 +n % <Plug>(MatchitNormalForward) + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 69 +n & * :&&<CR> + Nvim builtin + Last set from Lua +x * * y/\V<C-R>"<CR> + Nvim builtin + Last set from Lua +n > ~/keys +n Y * y$ + Nvim builtin + Last set from Lua +o [% <Plug>(MatchitOperationMultiBackward) + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 81 +x [% <Plug>(MatchitVisualMultiBackward) + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 79 +n [% <Plug>(MatchitNormalMultiBackward) + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 77 +o ]% <Plug>(MatchitOperationMultiForward) + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 82 +x ]% <Plug>(MatchitVisualMultiForward) + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 80 +n ]% <Plug>(MatchitNormalMultiForward) + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 78 +x a% <Plug>(MatchitVisualTextObject) + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 85 +x gx <Plug>NetrwBrowseXVis + Last set from /usr/share/nvim/runtime/plugin/netrwPlugin.vim line 88 +n gx <Plug>NetrwBrowseX + Last set from /usr/share/nvim/runtime/plugin/netrwPlugin.vim line 82 +o g% <Plug>(MatchitOperationBackward) + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 74 +x g% <Plug>(MatchitVisualBackward) + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 72 +n g% <Plug>(MatchitNormalBackward) + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 70 +n <C-H> * <Cmd>lua COQ.Nav_mark()<CR> + Last set from API client (channel id 0) +v <C-H> * <C-\><C-N><Cmd>lua COQ.Nav_mark()<CR> + Last set from API client (channel id 0) +n <C-Space> * <C-\><C-N>i<C-X><C-U> + Last set from API client (channel id 0) +v <C-Space> * <C-\><C-N>i<C-X><C-U> + Last set from API client (channel id 0) + <C-Down> * <Cmd>lua require("packer.load")({'vim-visual-multi'}, { keys = "<C-Down>", prefix = "" }, _G.packer_plugins)<CR> + Last set from Lua + <C-Up> * <Cmd>lua require("packer.load")({'vim-visual-multi'}, { keys = "<C-Up>", prefix = "" }, _G.packer_plugins)<CR> + Last set from Lua +n <C-S-`> * :TroubleToggle<CR> + Last set from Lua + <Plug>GuiTreeviewToggle & :call <SNR>26_TreeViewToggle() + Last set from /usr/share/nvim-qt/runtime/plugin/nvim_gui_shim.vim line 221 + <Plug>GuiTreeviewHide & :call <SNR>26_TreeViewShowHide(0) + Last set from /usr/share/nvim-qt/runtime/plugin/nvim_gui_shim.vim line 211 + <Plug>GuiTreeviewShow & :call <SNR>26_TreeViewShowHide(1) + Last set from /usr/share/nvim-qt/runtime/plugin/nvim_gui_shim.vim line 210 +x <Plug>NetrwBrowseXVis * :<C-U>call netrw#BrowseXVis()<CR> + Last set from /usr/share/nvim/runtime/plugin/netrwPlugin.vim line 90 +n <Plug>NetrwBrowseX * :call netrw#BrowseX(netrw#GX(),netrw#CheckIfRemote(netrw#GX()))<CR> + Last set from /usr/share/nvim/runtime/plugin/netrwPlugin.vim line 84 +x <Plug>(MatchitVisualTextObject) <Plug>(MatchitVisualMultiBackward)o<Plug>(MatchitVisualMultiForward) + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 66 +o <Plug>(MatchitOperationMultiForward) * :<C-U>call matchit#MultiMatch("W", "o")<CR> + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 63 +o <Plug>(MatchitOperationMultiBackward) * :<C-U>call matchit#MultiMatch("bW", "o")<CR> + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 62 +x <Plug>(MatchitVisualMultiForward) * :<C-U>call matchit#MultiMatch("W", "n")<CR>m'gv`` + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 61 +x <Plug>(MatchitVisualMultiBackward) * :<C-U>call matchit#MultiMatch("bW", "n")<CR>m'gv`` + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 60 +n <Plug>(MatchitNormalMultiForward) * :<C-U>call matchit#MultiMatch("W", "n")<CR> + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 59 +n <Plug>(MatchitNormalMultiBackward) * :<C-U>call matchit#MultiMatch("bW", "n")<CR> + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 58 +o <Plug>(MatchitOperationBackward) * :<C-U>call matchit#Match_wrapper('',0,'o')<CR> + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 55 +o <Plug>(MatchitOperationForward) * :<C-U>call matchit#Match_wrapper('',1,'o')<CR> + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 54 +x <Plug>(MatchitVisualBackward) * :<C-U>call matchit#Match_wrapper('',0,'v')<CR>m'gv`` + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 53 +x <Plug>(MatchitVisualForward) * :<C-U>call matchit#Match_wrapper('',1,'v')<CR>:if col("''") != col("$") | exe ":normal! m'" | endif<CR>gv`` + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 51 +n <Plug>(MatchitNormalBackward) * :<C-U>call matchit#Match_wrapper('',0,'n')<CR> + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 50 +n <Plug>(MatchitNormalForward) * :<C-U>call matchit#Match_wrapper('',1,'n')<CR> + Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 49 +n <C-S> * :set spell!<NL> + Last set from Lua +n <C-A> * <Esc>ggVG<NL> + Last set from Lua +n <C-L> * <Cmd>nohlsearch|diffupdate|normal! <C-L><CR> + Nvim builtin + Last set from Lua @@ -4,16 +4,42 @@ local ct = require 'conftool' -- -- Theme -- -vim.cmd('syntax on') +--vim.cmd('syntax on') +--vim.cmd('colo borterm') pk_use { - 'cormacrelf/vim-colors-github', + 'navarasu/onedark.nvim', setup = function() require('conftool').set({'background', 'dark'}) end, config = function() - vim.cmd [[colo github]] + local theme = require('onedark') + theme.setup { + style = 'darker', + } + theme.load() end } + +-- +-- Buffer Bar +-- +pk_use { + 'romgrk/barbar.nvim', + config = function() + require('bufferline').setup { + animation = false, + auto_hide = true, + icons = false, + icon_separator_active = '|', + icon_separator_inactive = ' ', + icon_close_tab = 'X', + icon_close_tab_modified = '*', + icon_pinned = '!' + + } + end +} + -- -- Indentation -- @@ -35,17 +61,17 @@ pk_use { } -- --- EtC. +-- Misc. -- -ct.set('ruler', 'showcmd', 'cursorline', 'number', 'termguicolors', 'title') +ct.set('ruler', 'showcmd', 'cursorline', 'number', 'title') ct.set( + {'termguicolors', true}, {'signcolumn', 'yes:1'}, - {'laststatus', 1}, - {'background', 'light'}, {'conceallevel', 0}, + {'colorcolumn', '81,121'}, {'textwidth', 0}, - {'wrapmargin', 0}, - {'laststatus', 1} + {'laststatus', 1}, + {'wrapmargin', 0} ) -- dont show line number in terminal window |
