Compare commits

...

8 Commits

Author SHA1 Message Date
Christian Chiarulli 24e1856862
Merge pull request #152 from rohanghige/22-autocommands
2 years ago
Rohan Ghige 219abb0e68 [FIX] Tree-sitter ensure_installed comment
2 years ago
Rohan Ghige 0dbe9df716 Fix warning in jsonls and whichkey
2 years ago
Rohan Ghige 6755f98df9 [FIX] nvim-tree warnings
2 years ago
Rohan Ghige 23c927e16d [FIX] cmp documentation error
2 years ago
Rohan Ghige a7e69fca89 [FIX] Tree-sitter ensure_installed error message
2 years ago
christianchiarulli 83357089dd note for autocommands
2 years ago
christianchiarulli 6e30af8ab7 add autocommands
2 years ago

@ -18,3 +18,4 @@ require "user.impatient"
require "user.indentline"
require "user.alpha"
require "user.whichkey"
require "user.autocommands"

@ -0,0 +1,34 @@
-- autocmd! remove all autocommands, if entered under a group it will clear that group
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
]]

@ -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'},

@ -119,8 +119,10 @@ cmp.setup {
behavior = cmp.ConfirmBehavior.Replace,
select = false,
},
documentation = {
border = { "", "", "", "", "", "", "", "" },
window = {
documentation = {
border = { "", "", "", "", "", "", "", "" },
},
},
experimental = {
ghost_text = false,

@ -169,6 +169,9 @@ local schemas = {
}
local function extend(tab1, tab2)
if tab2 == nil then
return tab2
end
for _, value in ipairs(tab2) do
table.insert(tab1, value)
end

@ -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 = {

@ -42,7 +42,6 @@ nvim_tree.setup {
"dashboard",
"alpha",
},
auto_close = true,
open_on_tab = false,
hijack_cursor = false,
update_cwd = true,
@ -98,15 +97,12 @@ nvim_tree.setup {
cmd = "trash",
require_confirm = true,
},
quit_on_open = 0,
git_hl = 1,
disable_window_picker = 0,
root_folder_modifier = ":t",
show_icons = {
git = 1,
folders = 1,
files = 1,
folder_arrows = 1,
tree_width = 30,
actions = {
open_file = {
quit_on_open = false,
window_picker = {
enable = false,
},
},
},
}

@ -4,7 +4,7 @@ if not status_ok then
end
configs.setup {
ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages
ensure_installed = "all", -- "all" (parsers with maintainers), or a list of languages
sync_install = false, -- install languages synchronously (only applied to `ensure_installed`)
ignore_install = { "" }, -- List of parsers to ignore installing
autopairs = {

@ -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>",
@ -144,7 +143,7 @@ local mappings = {
i = { "<cmd>LspInfo<cr>", "Info" },
I = { "<cmd>LspInstallInfo<cr>", "Installer Info" },
j = {
"<cmd>lua vim.lsp.diagnostic.goto_next()<CR>",
"<cmd>lua vim.diagnostic.goto_next()<CR>",
"Next Diagnostic",
},
k = {
@ -152,7 +151,7 @@ local mappings = {
"Prev Diagnostic",
},
l = { "<cmd>lua vim.lsp.codelens.run()<cr>", "CodeLens Action" },
q = { "<cmd>lua vim.lsp.diagnostic.set_loclist()<cr>", "Quickfix" },
q = { "<cmd>lua vim.diagnostic.setloclist()<cr>", "Quickfix" },
r = { "<cmd>lua vim.lsp.buf.rename()<cr>", "Rename" },
s = { "<cmd>Telescope lsp_document_symbols<cr>", "Document Symbols" },
S = {
@ -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)

Loading…
Cancel
Save