summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/user/autocommands.lua33
-rw-r--r--lua/user/bufferline.lua8
-rw-r--r--lua/user/lualine.lua2
-rw-r--r--lua/user/whichkey.lua16
4 files changed, 39 insertions, 20 deletions
diff --git a/lua/user/autocommands.lua b/lua/user/autocommands.lua
new file mode 100644
index 0000000..549f510
--- /dev/null
+++ b/lua/user/autocommands.lua
@@ -0,0 +1,33 @@
+vim.cmd [[
+ augroup _general_settings
+ autocmd!
+ autocmd FileType qf,help,man,lspinfo nnoremap <silent> <buffer> q :close<CR>
+ autocmd TextYankPost * silent!lua require('vim.highlight').on_yank({higroup = 'Search', timeout = 200})
+ autocmd BufWinEnter * :set formatoptions-=cro
+ autocmd FileType qf set nobuflisted
+ augroup end
+
+ augroup _git
+ autocmd!
+ autocmd FileType gitcommit setlocal wrap
+ autocmd FileType gitcommit setlocal spell
+ augroup end
+
+ augroup _markdown
+ autocmd!
+ autocmd FileType markdown setlocal wrap
+ autocmd FileType markdown setlocal spell
+ augroup end
+
+ augroup _auto_resize
+ autocmd!
+ autocmd VimResized * tabdo wincmd =
+ augroup end
+
+ augroup _alpha
+ autocmd!
+ autocmd User AlphaReady set showtabline=0 | autocmd BufUnload <buffer> set showtabline=2
+ augroup end
+
+]]
+
diff --git a/lua/user/bufferline.lua b/lua/user/bufferline.lua
index 81015c5..7d98cf0 100644
--- a/lua/user/bufferline.lua
+++ b/lua/user/bufferline.lua
@@ -92,12 +92,12 @@ bufferline.setup {
},
close_button = {
- guifg = { attribute = "fg", highlight = "TabLineSel" },
- guibg = { attribute = "bg", highlight = "TabLineSel" },
+ guifg = { attribute = "fg", highlight = "TabLine" },
+ guibg = { attribute = "bg", highlight = "TabLine" },
},
close_button_visible = {
- guifg = { attribute = "fg", highlight = "TabLineSel" },
- guibg = { attribute = "bg", highlight = "TabLineSel" },
+ guifg = { attribute = "fg", highlight = "TabLine" },
+ guibg = { attribute = "bg", highlight = "TabLine" },
},
-- close_button_selected = {
-- guifg = {attribute='fg',highlight='TabLineSel'},
diff --git a/lua/user/lualine.lua b/lua/user/lualine.lua
index 50484cb..3318ecd 100644
--- a/lua/user/lualine.lua
+++ b/lua/user/lualine.lua
@@ -68,7 +68,7 @@ lualine.setup({
theme = "auto",
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
- disabled_filetypes = { "dashboard", "NvimTree", "Outline" },
+ disabled_filetypes = { "alpha", "dashboard", "NvimTree", "Outline" },
always_divide_middle = true,
},
sections = {
diff --git a/lua/user/whichkey.lua b/lua/user/whichkey.lua
index 56f18f9..994435f 100644
--- a/lua/user/whichkey.lua
+++ b/lua/user/whichkey.lua
@@ -87,8 +87,7 @@ local mappings = {
["e"] = { "<cmd>NvimTreeToggle<cr>", "Explorer" },
["w"] = { "<cmd>w!<CR>", "Save" },
["q"] = { "<cmd>q!<CR>", "Quit" },
- ["/"] = { "<cmd>lua require('Comment').toggle()<CR>", "Comment" },
- ["c"] = { "<cmd>Bdelete! %d<CR>", "Close Buffer" },
+ ["c"] = { "<cmd>Bdelete!<CR>", "Close Buffer" },
["h"] = { "<cmd>nohlsearch<CR>", "No Highlight" },
["f"] = {
"<cmd>lua require('telescope.builtin').find_files(require('telescope.themes').get_dropdown{previewer = false})<cr>",
@@ -184,18 +183,5 @@ local mappings = {
},
}
-local vopts = {
- mode = "v", -- VISUAL mode
- prefix = "<leader>",
- buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings
- silent = true, -- use `silent` when creating keymaps
- noremap = true, -- use `noremap` when creating keymaps
- nowait = true, -- use `nowait` when creating keymaps
-}
-local vmappings = {
- ["/"] = { "<ESC><CMD>lua require('Comment.api').gc(vim.fn.visualmode())<CR>", "Comment" },
-}
-
which_key.setup(setup)
which_key.register(mappings, opts)
-which_key.register(vmappings, vopts)