summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Griffin <migriffin@disroot.org>2023-01-24 12:41:40 +0800
committerIan Griffin <migriffin@disroot.org>2023-01-24 12:41:40 +0800
commit0f73cb3fed54b16791cca87271e436b23f62c817 (patch)
tree4daeb52aba5a247e1fcd876892c69e142d88377c
parente3416f0e727500f2e35a823b917f52106a6db902 (diff)
updates
-rwxr-xr-xcolors/borterm.vim31
-rw-r--r--ginit.vim13
-rw-r--r--init.lua4
-rw-r--r--lua/binds.lua13
-rw-r--r--lua/conftool.lua5
-rw-r--r--lua/defs.lua8
-rw-r--r--lua/ide.lua21
-rw-r--r--lua/keys104
-rw-r--r--lua/ui.lua44
9 files changed, 208 insertions, 35 deletions
diff --git a/colors/borterm.vim b/colors/borterm.vim
new file mode 100755
index 0000000..706ed7b
--- /dev/null
+++ b/colors/borterm.vim
@@ -0,0 +1,31 @@
+hi clear
+set background=light
+if exists("syntax_on")
+ syntax reset
+endif
+let g:colors_name = "borterm"
+
+hi Normal ctermfg=8 ctermbg=NONE
+hi Comment ctermfg=2
+hi Constant ctermfg=13
+hi String ctermfg=10
+hi Identifier ctermfg=12 cterm=none
+hi Statement ctermfg=14
+hi PreProc ctermfg=10
+hi Type ctermfg=14
+hi Special ctermfg=14
+hi Error ctermbg=1
+hi Todo ctermfg=11 ctermbg=11
+hi Directory ctermfg=10
+hi Search ctermbg=11
+hi Number ctermfg=11
+hi Define ctermfg=14
+hi StatusLine ctermfg=7 ctermbg=8 cterm=none
+hi StatusLineNC ctermfg=0 ctermbg=15 cterm=none
+hi CursorLine ctermbg=15 cterm=none
+hi VertSplit ctermfg=0 ctermbg=7 cterm=bold
+hi LineNr ctermfg=11
+hi CursorLineNr ctermfg=11 cterm=none
+hi Visual ctermbg=15
+hi ColorColumn ctermbg=7
+hi SignColumn ctermbg=NONE
diff --git a/ginit.vim b/ginit.vim
index 2d7cca3..3f48ea0 100644
--- a/ginit.vim
+++ b/ginit.vim
@@ -1,10 +1,9 @@
-""
"" Font Setup
-""
-Guifont Source\ Code\ Pro:h10
+Guifont SauceCodePro\ Nerd\ Font\ Mono:h10
+"GuiRenderLigatures 1
+GuiScrollBar 1
+GuiTabline 0
-""
"" Colorscheme
-""
-set background=light
-colo github
+set background=dark
+set termguicolors
diff --git a/init.lua b/init.lua
index 4694d23..228df9d 100644
--- a/init.lua
+++ b/init.lua
@@ -30,6 +30,10 @@ if Packer_bootstrap then
packer.sync()
end
+-- Leader key
+vim.g.mapleader = ' '
+vim.g.maplocalleader = ' '
+
--
-- Load other files
--
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
diff --git a/lua/ui.lua b/lua/ui.lua
index 036bb70..4e14280 100644
--- a/lua/ui.lua
+++ b/lua/ui.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