mirror of
https://github.com/The-Repo-Club/DotFiles.git
synced 2024-11-25 00:38:20 -05:00
Update nvim configs
Signed-off-by: The-Repo-Club <wayne6324@gmail.com>
This commit is contained in:
parent
3221f78ea8
commit
f3c2cf1642
@ -5,27 +5,15 @@ end
|
||||
|
||||
local dashboard = require("alpha.themes.dashboard")
|
||||
dashboard.section.header.val = {
|
||||
" ",
|
||||
"================= =============== =============== ======== ========",
|
||||
"\\\\ . . . . . . .\\\\ //. . . . . . .\\\\ //. . . . . . .\\\\ \\\\. . .\\\\// . . //",
|
||||
"||. . ._____. . .|| ||. . ._____. . .|| ||. . ._____. . .|| || . . .\\/ . . .||",
|
||||
"|| . .|| ||. . || || . .|| ||. . || || . .|| ||. . || ||. . . . . . . ||",
|
||||
"||. . || || . .|| ||. . || || . .|| ||. . || || . .|| || . | . . . . .||",
|
||||
"|| . .|| ||. _-|| ||-_ .|| ||. . || || . .|| ||. _-|| ||-_.|\\ . . . . ||",
|
||||
"||. . || ||-' || || `-|| || . .|| ||. . || ||-' || || `|\\_ . .|. .||",
|
||||
"|| . _|| || || || || ||_ . || || . _|| || || || |\\ `-_/| . ||",
|
||||
"||_-' || .|/ || || \\|. || `-_|| ||_-' || .|/ || || | \\ / |-_.||",
|
||||
"|| ||_-' || || `-_|| || || ||_-' || || | \\ / | `||",
|
||||
"|| `' || || `' || || `' || || | \\ / | ||",
|
||||
"|| .===' `===. .==='.`===. .===' /==. | \\/ | ||",
|
||||
"|| .==' \\_|-_ `===. .===' _|_ `===. .===' _-|/ `== \\/ | ||",
|
||||
"|| .==' _-' `-_ `=' _-' `-_ `=' _-' `-_ /| \\/ | ||",
|
||||
"|| .==' _-' `-__\\._-' `-_./__-' `' |. /| | ||",
|
||||
"||.==' _-' `' | /==.||",
|
||||
"==' _-' \\/ `==",
|
||||
"\\ _-' `-_ /",
|
||||
" `'' [ Think NeoVim Author:The-Repo-Club ] ``' ",
|
||||
" "
|
||||
" ",
|
||||
" ooooo ooooo oooo oooo oooo o ",
|
||||
" 888 888 88 8888o 88 888 ",
|
||||
" 888 888 88 88 888o88 8 88 ",
|
||||
" 888 o 888 88 88 8888 8oooo88 ",
|
||||
" o888ooooo88 888oo88 o88o 88 o88o o888o ",
|
||||
" ",
|
||||
" ",
|
||||
" [ Think NeoVim Author:The-Repo-Club ] ",
|
||||
}
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button("f", " Find file", ":Telescope find_files <CR>"),
|
||||
@ -38,7 +26,7 @@ dashboard.section.buttons.val = {
|
||||
}
|
||||
|
||||
local function footer()
|
||||
-- NOTE: requires the fortune-mod package to work
|
||||
-- NOTE: requires the fortune-mod package to work
|
||||
-- local handle = io.popen("fortune")
|
||||
-- local fortune = handle:read("*a")
|
||||
-- handle:close()
|
||||
|
@ -1,38 +1,69 @@
|
||||
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 = 'Visual', timeout = 200})
|
||||
autocmd BufWinEnter * :set formatoptions-=cro
|
||||
autocmd FileType qf set nobuflisted
|
||||
augroup end
|
||||
-- General Settings auto commands
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
group = vim.api.nvim_create_augroup("_general_settings", { clear = true }),
|
||||
pattern = { "qf", "help", "man", "lspinfo" },
|
||||
command = "nnoremap <silent> <buffer> q :close<CR>",
|
||||
})
|
||||
|
||||
augroup _git
|
||||
autocmd!
|
||||
autocmd FileType gitcommit setlocal wrap
|
||||
autocmd FileType gitcommit setlocal spell
|
||||
augroup end
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
group = vim.api.nvim_create_augroup("_general_settings", { clear = true }),
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
require("vim.highlight").on_yank({ higroup = "Visual", timeout = 200 })
|
||||
end,
|
||||
})
|
||||
|
||||
augroup _markdown
|
||||
autocmd!
|
||||
autocmd FileType markdown setlocal wrap
|
||||
autocmd FileType markdown setlocal spell
|
||||
augroup end
|
||||
vim.api.nvim_create_autocmd("BufWinEnter", {
|
||||
group = vim.api.nvim_create_augroup("_general_settings", { clear = true }),
|
||||
pattern = "*",
|
||||
command = "set formatoptions-=cro",
|
||||
})
|
||||
|
||||
augroup _auto_resize
|
||||
autocmd!
|
||||
autocmd VimResized * tabdo wincmd =
|
||||
augroup end
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
group = vim.api.nvim_create_augroup("_general_settings", { clear = true }),
|
||||
pattern = "qf",
|
||||
command = "set nobuflisted",
|
||||
})
|
||||
|
||||
augroup _alpha
|
||||
autocmd!
|
||||
autocmd User AlphaReady set laststatus=0 | autocmd BufUnload <buffer> set laststatus=2
|
||||
autocmd User AlphaReady set showtabline=0 | autocmd BufUnload <buffer> set showtabline=2
|
||||
augroup end
|
||||
]]
|
||||
-- Git auto commands
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
group = vim.api.nvim_create_augroup("_git", { clear = true }),
|
||||
pattern = "gitcommit",
|
||||
command = "setlocal wrap | setlocal spell",
|
||||
})
|
||||
|
||||
-- Autoformat
|
||||
-- augroup _lsp
|
||||
-- autocmd!
|
||||
-- autocmd BufWritePre * lua vim.lsp.buf.formatting()
|
||||
-- augroup end
|
||||
-- Markdown auto commands
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
group = vim.api.nvim_create_augroup("_markdown", { clear = true }),
|
||||
pattern = "markdown",
|
||||
command = "setlocal wrap | setlocal spell",
|
||||
})
|
||||
|
||||
-- Auto resize auto commands
|
||||
vim.api.nvim_create_autocmd("VimResized", {
|
||||
group = vim.api.nvim_create_augroup("_auto_resize", { clear = true }),
|
||||
pattern = "*",
|
||||
command = "tabdo wincmd =",
|
||||
})
|
||||
|
||||
-- Alpha dashboard auto commands
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
group = vim.api.nvim_create_augroup("_alpha", { clear = true }),
|
||||
pattern = "AlphaReady",
|
||||
command = "<buffer> set laststatus=0 | <buffer> set showtabline=0 | <buffer> set mouse=a",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("BufUnload", {
|
||||
group = vim.api.nvim_create_augroup("_alpha", { clear = true }),
|
||||
pattern = "AlphaReady",
|
||||
command = "<buffer> set laststatus=2 | <buffer> set showtabline=2 | <buffer> set mouse=a",
|
||||
})
|
||||
|
||||
-- LSP auto commands
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = vim.api.nvim_create_augroup("_lsp", { clear = true }),
|
||||
pattern = "*.lua",
|
||||
callback = function()
|
||||
require("stylua").format()
|
||||
end,
|
||||
})
|
||||
|
@ -1,165 +1,167 @@
|
||||
local status_ok, bufferline = pcall(require, "bufferline")
|
||||
if not status_ok then return end
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
bufferline.setup {
|
||||
options = {
|
||||
numbers = "none", -- | "ordinal" | "buffer_id" | "both" | function({ ordinal, id, lower, raise }): string,
|
||||
close_command = "Bdelete! %d", -- can be a string | function, see "Mouse actions"
|
||||
right_mouse_command = "Bdelete! %d", -- can be a string | function, see "Mouse actions"
|
||||
left_mouse_command = "buffer %d", -- can be a string | function, see "Mouse actions"
|
||||
middle_mouse_command = nil, -- can be a string | function, see "Mouse actions"
|
||||
-- NOTE: this plugin is designed with this icon in mind,
|
||||
-- and so changing this is NOT recommended, this is intended
|
||||
-- as an escape hatch for people who cannot bear it for whatever reason
|
||||
indicator_icon = "▎",
|
||||
buffer_close_icon = "",
|
||||
-- buffer_close_icon = '',
|
||||
modified_icon = "●",
|
||||
close_icon = "",
|
||||
-- close_icon = '',
|
||||
left_trunc_marker = "",
|
||||
right_trunc_marker = "",
|
||||
--- name_formatter can be used to change the buffer's label in the bufferline.
|
||||
--- Please note some names can/will break the
|
||||
--- bufferline so use this at your discretion knowing that it has
|
||||
--- some limitations that will *NOT* be fixed.
|
||||
-- name_formatter = function(buf) -- buf contains a "name", "path" and "bufnr"
|
||||
-- -- remove extension from markdown files for example
|
||||
-- if buf.name:match('%.md') then
|
||||
-- return vim.fn.fnamemodify(buf.name, ':t:r')
|
||||
-- end
|
||||
-- end,
|
||||
max_name_length = 30,
|
||||
max_prefix_length = 30, -- prefix used when a buffer is de-duplicated
|
||||
tab_size = 21,
|
||||
diagnostics = false, -- | "nvim_lsp" | "coc",
|
||||
diagnostics_update_in_insert = false,
|
||||
-- diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||
-- return "("..count..")"
|
||||
-- end,
|
||||
-- NOTE: this will be called a lot so don't do any heavy processing here
|
||||
-- custom_filter = function(buf_number)
|
||||
-- -- filter out filetypes you don't want to see
|
||||
-- if vim.bo[buf_number].filetype ~= "<i-dont-want-to-see-this>" then
|
||||
-- return true
|
||||
-- end
|
||||
-- -- filter out by buffer name
|
||||
-- if vim.fn.bufname(buf_number) ~= "<buffer-name-I-dont-want>" then
|
||||
-- return true
|
||||
-- end
|
||||
-- -- filter out based on arbitrary rules
|
||||
-- -- e.g. filter out vim wiki buffer from tabline in your work repo
|
||||
-- if vim.fn.getcwd() == "<work-repo>" and vim.bo[buf_number].filetype ~= "wiki" then
|
||||
-- return true
|
||||
-- end
|
||||
-- end,
|
||||
offsets = {{filetype = "NvimTree", text = "", padding = 1}},
|
||||
show_buffer_icons = true,
|
||||
show_buffer_close_icons = true,
|
||||
show_close_icon = true,
|
||||
show_tab_indicators = true,
|
||||
persist_buffer_sort = true, -- whether or not custom sorted buffers should persist
|
||||
-- can also be a table containing 2 custom separators
|
||||
-- [focused and unfocused]. eg: { '|', '|' }
|
||||
separator_style = "thin", -- | "thick" | "thin" | { 'any', 'any' },
|
||||
enforce_regular_tabs = true,
|
||||
always_show_bufferline = true
|
||||
-- sort_by = 'id' | 'extension' | 'relative_directory' | 'directory' | 'tabs' | function(buffer_a, buffer_b)
|
||||
-- -- add custom logic
|
||||
-- return buffer_a.modified > buffer_b.modified
|
||||
-- end
|
||||
},
|
||||
highlights = {
|
||||
fill = {
|
||||
fg = {attribute = "fg", highlight = "#ff0000"},
|
||||
bg = {attribute = "bg", highlight = "TabLine"}
|
||||
},
|
||||
background = {
|
||||
fg = {attribute = "fg", highlight = "TabLine"},
|
||||
bg = {attribute = "bg", highlight = "TabLine"}
|
||||
},
|
||||
bufferline.setup({
|
||||
options = {
|
||||
numbers = "none", -- | "ordinal" | "buffer_id" | "both" | function({ ordinal, id, lower, raise }): string,
|
||||
close_command = "Bdelete! %d", -- can be a string | function, see "Mouse actions"
|
||||
right_mouse_command = "Bdelete! %d", -- can be a string | function, see "Mouse actions"
|
||||
left_mouse_command = "buffer %d", -- can be a string | function, see "Mouse actions"
|
||||
middle_mouse_command = nil, -- can be a string | function, see "Mouse actions"
|
||||
-- NOTE: this plugin is designed with this icon in mind,
|
||||
-- and so changing this is NOT recommended, this is intended
|
||||
-- as an escape hatch for people who cannot bear it for whatever reason
|
||||
indicator_icon = "▎",
|
||||
buffer_close_icon = "",
|
||||
-- buffer_close_icon = '',
|
||||
modified_icon = "●",
|
||||
close_icon = "",
|
||||
-- close_icon = '',
|
||||
left_trunc_marker = "",
|
||||
right_trunc_marker = "",
|
||||
--- name_formatter can be used to change the buffer's label in the bufferline.
|
||||
--- Please note some names can/will break the
|
||||
--- bufferline so use this at your discretion knowing that it has
|
||||
--- some limitations that will *NOT* be fixed.
|
||||
-- name_formatter = function(buf) -- buf contains a "name", "path" and "bufnr"
|
||||
-- -- remove extension from markdown files for example
|
||||
-- if buf.name:match('%.md') then
|
||||
-- return vim.fn.fnamemodify(buf.name, ':t:r')
|
||||
-- end
|
||||
-- end,
|
||||
max_name_length = 30,
|
||||
max_prefix_length = 30, -- prefix used when a buffer is de-duplicated
|
||||
tab_size = 21,
|
||||
diagnostics = false, -- | "nvim_lsp" | "coc",
|
||||
diagnostics_update_in_insert = false,
|
||||
-- diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||
-- return "("..count..")"
|
||||
-- end,
|
||||
-- NOTE: this will be called a lot so don't do any heavy processing here
|
||||
-- custom_filter = function(buf_number)
|
||||
-- -- filter out filetypes you don't want to see
|
||||
-- if vim.bo[buf_number].filetype ~= "<i-dont-want-to-see-this>" then
|
||||
-- return true
|
||||
-- end
|
||||
-- -- filter out by buffer name
|
||||
-- if vim.fn.bufname(buf_number) ~= "<buffer-name-I-dont-want>" then
|
||||
-- return true
|
||||
-- end
|
||||
-- -- filter out based on arbitrary rules
|
||||
-- -- e.g. filter out vim wiki buffer from tabline in your work repo
|
||||
-- if vim.fn.getcwd() == "<work-repo>" and vim.bo[buf_number].filetype ~= "wiki" then
|
||||
-- return true
|
||||
-- end
|
||||
-- end,
|
||||
offsets = { { filetype = "NvimTree", text = "", padding = 1 } },
|
||||
show_buffer_icons = true,
|
||||
show_buffer_close_icons = true,
|
||||
show_close_icon = true,
|
||||
show_tab_indicators = true,
|
||||
persist_buffer_sort = true, -- whether or not custom sorted buffers should persist
|
||||
-- can also be a table containing 2 custom separators
|
||||
-- [focused and unfocused]. eg: { '|', '|' }
|
||||
separator_style = "thin", -- | "thick" | "thin" | { 'any', 'any' },
|
||||
enforce_regular_tabs = true,
|
||||
always_show_bufferline = true,
|
||||
-- sort_by = 'id' | 'extension' | 'relative_directory' | 'directory' | 'tabs' | function(buffer_a, buffer_b)
|
||||
-- -- add custom logic
|
||||
-- return buffer_a.modified > buffer_b.modified
|
||||
-- end
|
||||
},
|
||||
highlights = {
|
||||
fill = {
|
||||
fg = { attribute = "fg", highlight = "#ff0000" },
|
||||
bg = { attribute = "bg", highlight = "TabLine" },
|
||||
},
|
||||
background = {
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "bg", highlight = "TabLine" },
|
||||
},
|
||||
|
||||
buffer_selected = {
|
||||
fg = {attribute = 'fg', highlight = '#ff0000'},
|
||||
bg = {attribute = 'bg', highlight = '#0000ff'}
|
||||
},
|
||||
buffer_selected = {
|
||||
fg = { attribute = "fg", highlight = "#ff0000" },
|
||||
bg = { attribute = "bg", highlight = "#0000ff" },
|
||||
},
|
||||
|
||||
buffer_visible = {
|
||||
fg = {attribute = "fg", highlight = "TabLine"},
|
||||
bg = {attribute = "bg", highlight = "TabLine"}
|
||||
},
|
||||
buffer_visible = {
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "bg", highlight = "TabLine" },
|
||||
},
|
||||
|
||||
close_button = {
|
||||
fg = {attribute = "fg", highlight = "TabLine"},
|
||||
bg = {attribute = "bg", highlight = "TabLine"}
|
||||
},
|
||||
close_button_visible = {
|
||||
fg = {attribute = "fg", highlight = "TabLine"},
|
||||
bg = {attribute = "bg", highlight = "TabLine"}
|
||||
},
|
||||
-- close_button_selected = {
|
||||
-- fg = {attribute='fg',highlight='TabLineSel'},
|
||||
-- bg ={attribute='bg',highlight='TabLineSel'}
|
||||
-- },
|
||||
close_button = {
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "bg", highlight = "TabLine" },
|
||||
},
|
||||
close_button_visible = {
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "bg", highlight = "TabLine" },
|
||||
},
|
||||
-- close_button_selected = {
|
||||
-- fg = {attribute='fg',highlight='TabLineSel'},
|
||||
-- bg ={attribute='bg',highlight='TabLineSel'}
|
||||
-- },
|
||||
|
||||
tab_selected = {
|
||||
fg = {attribute = "fg", highlight = "Normal"},
|
||||
bg = {attribute = "bg", highlight = "Normal"}
|
||||
},
|
||||
tab = {
|
||||
fg = {attribute = "fg", highlight = "TabLine"},
|
||||
bg = {attribute = "bg", highlight = "TabLine"}
|
||||
},
|
||||
tab_close = {
|
||||
-- fg = {attribute='fg',highlight='LspDiagnosticsDefaultError'},
|
||||
fg = {attribute = "fg", highlight = "TabLineSel"},
|
||||
bg = {attribute = "bg", highlight = "Normal"}
|
||||
},
|
||||
tab_selected = {
|
||||
fg = { attribute = "fg", highlight = "Normal" },
|
||||
bg = { attribute = "bg", highlight = "Normal" },
|
||||
},
|
||||
tab = {
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "bg", highlight = "TabLine" },
|
||||
},
|
||||
tab_close = {
|
||||
-- fg = {attribute='fg',highlight='LspDiagnosticsDefaultError'},
|
||||
fg = { attribute = "fg", highlight = "TabLineSel" },
|
||||
bg = { attribute = "bg", highlight = "Normal" },
|
||||
},
|
||||
|
||||
duplicate_selected = {
|
||||
fg = {attribute = "fg", highlight = "TabLineSel"},
|
||||
bg = {attribute = "bg", highlight = "TabLineSel"},
|
||||
italic = true
|
||||
},
|
||||
duplicate_visible = {
|
||||
fg = {attribute = "fg", highlight = "TabLine"},
|
||||
bg = {attribute = "bg", highlight = "TabLine"},
|
||||
italic = true
|
||||
},
|
||||
duplicate = {
|
||||
fg = {attribute = "fg", highlight = "TabLine"},
|
||||
bg = {attribute = "bg", highlight = "TabLine"},
|
||||
italic = true
|
||||
},
|
||||
duplicate_selected = {
|
||||
fg = { attribute = "fg", highlight = "TabLineSel" },
|
||||
bg = { attribute = "bg", highlight = "TabLineSel" },
|
||||
italic = true,
|
||||
},
|
||||
duplicate_visible = {
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "bg", highlight = "TabLine" },
|
||||
italic = true,
|
||||
},
|
||||
duplicate = {
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "bg", highlight = "TabLine" },
|
||||
italic = true,
|
||||
},
|
||||
|
||||
modified = {
|
||||
fg = {attribute = "fg", highlight = "TabLine"},
|
||||
bg = {attribute = "bg", highlight = "TabLine"}
|
||||
},
|
||||
modified_selected = {
|
||||
fg = {attribute = "fg", highlight = "Normal"},
|
||||
bg = {attribute = "bg", highlight = "Normal"}
|
||||
},
|
||||
modified_visible = {
|
||||
fg = {attribute = "fg", highlight = "TabLine"},
|
||||
bg = {attribute = "bg", highlight = "TabLine"}
|
||||
},
|
||||
modified = {
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "bg", highlight = "TabLine" },
|
||||
},
|
||||
modified_selected = {
|
||||
fg = { attribute = "fg", highlight = "Normal" },
|
||||
bg = { attribute = "bg", highlight = "Normal" },
|
||||
},
|
||||
modified_visible = {
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "bg", highlight = "TabLine" },
|
||||
},
|
||||
|
||||
separator = {
|
||||
fg = {attribute = "bg", highlight = "TabLine"},
|
||||
bg = {attribute = "bg", highlight = "TabLine"}
|
||||
},
|
||||
separator_selected = {
|
||||
fg = {attribute = "bg", highlight = "Normal"},
|
||||
bg = {attribute = "bg", highlight = "Normal"}
|
||||
},
|
||||
-- separator_visible = {
|
||||
-- fg = {attribute='bg',highlight='TabLine'},
|
||||
-- bg = {attribute='bg',highlight='TabLine'}
|
||||
-- },
|
||||
indicator_selected = {
|
||||
fg = {attribute = "fg", highlight = "LspDiagnosticsDefaultHint"},
|
||||
bg = {attribute = "bg", highlight = "Normal"}
|
||||
}
|
||||
}
|
||||
}
|
||||
separator = {
|
||||
fg = { attribute = "bg", highlight = "TabLine" },
|
||||
bg = { attribute = "bg", highlight = "TabLine" },
|
||||
},
|
||||
separator_selected = {
|
||||
fg = { attribute = "bg", highlight = "Normal" },
|
||||
bg = { attribute = "bg", highlight = "Normal" },
|
||||
},
|
||||
-- separator_visible = {
|
||||
-- fg = {attribute='bg',highlight='TabLine'},
|
||||
-- bg = {attribute='bg',highlight='TabLine'}
|
||||
-- },
|
||||
indicator_selected = {
|
||||
fg = { attribute = "fg", highlight = "LspDiagnosticsDefaultHint" },
|
||||
bg = { attribute = "bg", highlight = "Normal" },
|
||||
},
|
||||
},
|
||||
})
|
||||
|
@ -1,9 +1,9 @@
|
||||
local header = require('header')
|
||||
local header = require("header")
|
||||
|
||||
header.setup({
|
||||
username = 'The-Repo-Club',
|
||||
git = 'https://github.com/The-Repo-Club',
|
||||
email = 'wayne6324@gmail.com',
|
||||
username = "The-Repo-Club",
|
||||
git = "https://github.com/The-Repo-Club",
|
||||
email = "wayne6324@gmail.com",
|
||||
-- You can also extend filetypes, e.g:
|
||||
ft = {
|
||||
c = {
|
||||
@ -35,6 +35,6 @@ header.setup({
|
||||
start_comment = '""',
|
||||
end_comment = '""',
|
||||
fill_comment = "*",
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
@ -3,195 +3,206 @@ local fn = vim.fn
|
||||
-- Automatically install packer
|
||||
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
PACKER_BOOTSTRAP = fn.system({
|
||||
"git", "clone", "--depth", "1",
|
||||
"https://github.com/wbthomason/packer.nvim", install_path
|
||||
})
|
||||
print("Installing packer close and reopen Neovim...")
|
||||
vim.cmd([[packadd packer.nvim]])
|
||||
PACKER_BOOTSTRAP = fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--depth",
|
||||
"1",
|
||||
"https://github.com/wbthomason/packer.nvim",
|
||||
install_path,
|
||||
})
|
||||
print("Installing packer close and reopen Neovim...")
|
||||
vim.cmd([[packadd packer.nvim]])
|
||||
end
|
||||
|
||||
-- Autocommand that reloads neovim whenever you save the plugins.lua file
|
||||
vim.cmd([[
|
||||
augroup packer_user_config
|
||||
autocmd!
|
||||
autocmd BufWritePost plugins.lua source <afile> | PackerSync
|
||||
augroup end
|
||||
]])
|
||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||
group = vim.api.nvim_create_augroup("packer_user_config", { clear = true }),
|
||||
pattern = "plugins.lua",
|
||||
callback = function()
|
||||
vim.cmd("source <afile>")
|
||||
require("packer").sync()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Use a protected call so we don't error out on first use
|
||||
local status_ok, packer = pcall(require, "packer")
|
||||
if not status_ok then return end
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
-- Have packer use a popup window
|
||||
packer.init({
|
||||
display = {
|
||||
open_fn = function()
|
||||
return require("packer.util").float({border = "rounded"})
|
||||
end
|
||||
}
|
||||
display = {
|
||||
open_fn = function()
|
||||
return require("packer.util").float({ border = "rounded" })
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
-- Install your plugins here
|
||||
return packer.startup(function(use)
|
||||
-- My plugins here
|
||||
-- My plugins here
|
||||
|
||||
use({
|
||||
"wbthomason/packer.nvim",
|
||||
commit = "90b323bccc04ad9b23c971a85813a1405c7725a8"
|
||||
}) -- Have packer manage itself
|
||||
use({
|
||||
"nvim-lua/plenary.nvim",
|
||||
commit = "31807eef4ed574854b8a53ae40ea3292033a78ea"
|
||||
}) -- Useful lua functions used by lots of plugins
|
||||
use({
|
||||
"windwp/nvim-autopairs",
|
||||
commit = "34bd374f75fb58656572f847e2bc3565b0acb34f"
|
||||
}) -- Autopairs, integrates with both cmp and treesitter
|
||||
use({
|
||||
"numToStr/Comment.nvim",
|
||||
commit = "0932d0cdcee31d12664f20f728cde8915614a623"
|
||||
})
|
||||
use({
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
commit = "4befb8936f5cbec3b726300ab29edacb891e1a7b"
|
||||
})
|
||||
use({
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
commit = "2d02a56189e2bde11edd4712fea16f08a6656944"
|
||||
})
|
||||
use({
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
commit = "09a51266bca28dd87febd63c66bdbd74f7764a63"
|
||||
})
|
||||
use({
|
||||
"akinsho/bufferline.nvim",
|
||||
commit = "f5791fdd561c564491563cd4139727c38d135dbf"
|
||||
})
|
||||
use({
|
||||
"moll/vim-bbye",
|
||||
commit = "25ef93ac5a87526111f43e5110675032dbcacf56"
|
||||
})
|
||||
use({
|
||||
"nvim-lualine/lualine.nvim",
|
||||
commit = "c0510ddec86070dbcacbd291736de27aabbf3bfe"
|
||||
})
|
||||
use({
|
||||
"akinsho/toggleterm.nvim",
|
||||
commit = "62683d927dfd30dc68441a5811fdcb6c9f176c42"
|
||||
})
|
||||
use({
|
||||
"ahmedkhalf/project.nvim",
|
||||
commit = "090bb11ee7eb76ebb9d0be1c6060eac4f69a240f"
|
||||
})
|
||||
use({
|
||||
"lewis6991/impatient.nvim",
|
||||
commit = "49f4ed4a96e0dec3425f270001f341f78400fb49"
|
||||
})
|
||||
use({
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
commit = "c15bbe9f23d88b5c0b4ca45a446e01a0a3913707"
|
||||
})
|
||||
use({
|
||||
"goolord/alpha-nvim",
|
||||
commit = "d688f46090a582be8f9d7b70b4cf999b780e993d"
|
||||
})
|
||||
use("folke/which-key.nvim")
|
||||
use({
|
||||
"wbthomason/packer.nvim",
|
||||
commit = "90b323bccc04ad9b23c971a85813a1405c7725a8",
|
||||
}) -- Have packer manage itself
|
||||
use({
|
||||
"nvim-lua/plenary.nvim",
|
||||
commit = "31807eef4ed574854b8a53ae40ea3292033a78ea",
|
||||
}) -- Useful lua functions used by lots of plugins
|
||||
use({
|
||||
"windwp/nvim-autopairs",
|
||||
commit = "34bd374f75fb58656572f847e2bc3565b0acb34f",
|
||||
}) -- Autopairs, integrates with both cmp and treesitter
|
||||
use({
|
||||
"numToStr/Comment.nvim",
|
||||
commit = "0932d0cdcee31d12664f20f728cde8915614a623",
|
||||
})
|
||||
use({
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
commit = "4befb8936f5cbec3b726300ab29edacb891e1a7b",
|
||||
})
|
||||
use({
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
commit = "2d02a56189e2bde11edd4712fea16f08a6656944",
|
||||
})
|
||||
use({
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
commit = "09a51266bca28dd87febd63c66bdbd74f7764a63",
|
||||
})
|
||||
use({
|
||||
"akinsho/bufferline.nvim",
|
||||
commit = "f5791fdd561c564491563cd4139727c38d135dbf",
|
||||
})
|
||||
use({
|
||||
"moll/vim-bbye",
|
||||
commit = "25ef93ac5a87526111f43e5110675032dbcacf56",
|
||||
})
|
||||
use({
|
||||
"nvim-lualine/lualine.nvim",
|
||||
commit = "c0510ddec86070dbcacbd291736de27aabbf3bfe",
|
||||
})
|
||||
use({
|
||||
"akinsho/toggleterm.nvim",
|
||||
commit = "62683d927dfd30dc68441a5811fdcb6c9f176c42",
|
||||
})
|
||||
use({
|
||||
"ahmedkhalf/project.nvim",
|
||||
commit = "090bb11ee7eb76ebb9d0be1c6060eac4f69a240f",
|
||||
})
|
||||
use({
|
||||
"lewis6991/impatient.nvim",
|
||||
commit = "49f4ed4a96e0dec3425f270001f341f78400fb49",
|
||||
})
|
||||
use({
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
commit = "c15bbe9f23d88b5c0b4ca45a446e01a0a3913707",
|
||||
})
|
||||
use({
|
||||
"goolord/alpha-nvim",
|
||||
commit = "d688f46090a582be8f9d7b70b4cf999b780e993d",
|
||||
})
|
||||
use("folke/which-key.nvim")
|
||||
|
||||
-- Colorschemes
|
||||
use({
|
||||
"folke/tokyonight.nvim",
|
||||
commit = "8223c970677e4d88c9b6b6d81bda23daf11062bb"
|
||||
})
|
||||
use("Minimal-Mistakes/minimalmistakes-nvim")
|
||||
-- Colorschemes
|
||||
use({
|
||||
"folke/tokyonight.nvim",
|
||||
commit = "8223c970677e4d88c9b6b6d81bda23daf11062bb",
|
||||
})
|
||||
use("Minimal-Mistakes/minimalmistakes-nvim")
|
||||
|
||||
-- cmp plugins
|
||||
use({
|
||||
"hrsh7th/nvim-cmp",
|
||||
commit = "b1ebdb0a17daaad13606b802780313a32e59781b"
|
||||
}) -- The completion plugin
|
||||
use({
|
||||
"hrsh7th/cmp-buffer",
|
||||
commit = "3022dbc9166796b644a841a02de8dd1cc1d311fa"
|
||||
}) -- buffer completions
|
||||
use({
|
||||
"hrsh7th/cmp-cmdline",
|
||||
commit = "9c0e331fe78cab7ede1c051c065ee2fc3cf9432e"
|
||||
}) -- cmdline completions
|
||||
use({
|
||||
"hrsh7th/cmp-path",
|
||||
commit = "447c87cdd6e6d6a1d2488b1d43108bfa217f56e1"
|
||||
}) -- path completions
|
||||
use({
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
commit = "a9de941bcbda508d0a45d28ae366bb3f08db2e36"
|
||||
}) -- snippet completions
|
||||
use({
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
commit = "affe808a5c56b71630f17aa7c38e15c59fd648a8"
|
||||
})
|
||||
use({
|
||||
"hrsh7th/cmp-nvim-lua",
|
||||
commit = "d276254e7198ab7d00f117e88e223b4bd8c02d21"
|
||||
})
|
||||
-- cmp plugins
|
||||
use({
|
||||
"hrsh7th/nvim-cmp",
|
||||
commit = "b1ebdb0a17daaad13606b802780313a32e59781b",
|
||||
}) -- The completion plugin
|
||||
use({
|
||||
"hrsh7th/cmp-buffer",
|
||||
commit = "3022dbc9166796b644a841a02de8dd1cc1d311fa",
|
||||
}) -- buffer completions
|
||||
use({
|
||||
"hrsh7th/cmp-cmdline",
|
||||
commit = "9c0e331fe78cab7ede1c051c065ee2fc3cf9432e",
|
||||
}) -- cmdline completions
|
||||
use({
|
||||
"hrsh7th/cmp-path",
|
||||
commit = "447c87cdd6e6d6a1d2488b1d43108bfa217f56e1",
|
||||
}) -- path completions
|
||||
use({
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
commit = "a9de941bcbda508d0a45d28ae366bb3f08db2e36",
|
||||
}) -- snippet completions
|
||||
use({
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
commit = "affe808a5c56b71630f17aa7c38e15c59fd648a8",
|
||||
})
|
||||
use({
|
||||
"hrsh7th/cmp-nvim-lua",
|
||||
commit = "d276254e7198ab7d00f117e88e223b4bd8c02d21",
|
||||
})
|
||||
|
||||
-- snippets
|
||||
use({
|
||||
"L3MON4D3/LuaSnip",
|
||||
commit = "b8fa22fc12df7a8c48f5c18156874d40f584265c"
|
||||
}) -- snippet engine
|
||||
use({
|
||||
"rafamadriz/friendly-snippets",
|
||||
commit = "b2446100d9f6609526cf1839b4ce3dc1ff07ada0"
|
||||
}) -- a bunch of snippets to use
|
||||
-- snippets
|
||||
use({
|
||||
"L3MON4D3/LuaSnip",
|
||||
commit = "b8fa22fc12df7a8c48f5c18156874d40f584265c",
|
||||
}) -- snippet engine
|
||||
use({
|
||||
"rafamadriz/friendly-snippets",
|
||||
commit = "b2446100d9f6609526cf1839b4ce3dc1ff07ada0",
|
||||
}) -- a bunch of snippets to use
|
||||
|
||||
-- LSP
|
||||
use({
|
||||
"neovim/nvim-lspconfig",
|
||||
commit = "da7461b596d70fa47b50bf3a7acfaef94c47727d"
|
||||
}) -- enable LSP
|
||||
use({
|
||||
"williamboman/nvim-lsp-installer",
|
||||
commit = "e3ccf37c044a8e41a945ba03fffc0edb7b4eaaff"
|
||||
}) -- simple to use language server installer
|
||||
use({
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
commit = "8914051a3d399e9715833ad76bbf5fe69ea7faf0"
|
||||
}) -- for formatters and linters
|
||||
-- LSP
|
||||
use({
|
||||
"neovim/nvim-lspconfig",
|
||||
commit = "da7461b596d70fa47b50bf3a7acfaef94c47727d",
|
||||
}) -- enable LSP
|
||||
use({
|
||||
"williamboman/nvim-lsp-installer",
|
||||
commit = "e3ccf37c044a8e41a945ba03fffc0edb7b4eaaff",
|
||||
}) -- simple to use language server installer
|
||||
use({
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
commit = "8914051a3d399e9715833ad76bbf5fe69ea7faf0",
|
||||
}) -- for formatters and linters
|
||||
|
||||
-- Telescope
|
||||
use({
|
||||
"nvim-telescope/telescope.nvim",
|
||||
commit = "d793de0f12d874c463e81edabee741b802c1a37a"
|
||||
})
|
||||
-- Telescope
|
||||
use({
|
||||
"nvim-telescope/telescope.nvim",
|
||||
commit = "d793de0f12d874c463e81edabee741b802c1a37a",
|
||||
})
|
||||
|
||||
-- Treesitter
|
||||
use({
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
commit = "e5c60516b5457b31628ad2c975c9b0dcacb0cbc2"
|
||||
})
|
||||
-- Treesitter
|
||||
use({
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
commit = "e5c60516b5457b31628ad2c975c9b0dcacb0cbc2",
|
||||
})
|
||||
|
||||
-- Git
|
||||
use({
|
||||
"lewis6991/gitsigns.nvim",
|
||||
commit = "29468d89e71a0cd04aeb750fcfe75c3163347adf"
|
||||
})
|
||||
-- Git
|
||||
use({
|
||||
"lewis6991/gitsigns.nvim",
|
||||
commit = "29468d89e71a0cd04aeb750fcfe75c3163347adf",
|
||||
})
|
||||
|
||||
-- Custom
|
||||
use {"cappyzawa/trim.nvim"}
|
||||
use {"ap/vim-css-color"}
|
||||
use {"tpope/vim-fugitive"}
|
||||
use {"airblade/vim-gitgutter"}
|
||||
use {"ctrlpvim/ctrlp.vim"}
|
||||
use {"lyuts/vim-rtags"}
|
||||
use {"wakatime/vim-wakatime"}
|
||||
use {"mboughaba/i3config.vim"}
|
||||
use {"The-Repo-Club/header.nvim"}
|
||||
use {"The-Repo-Club/Vim_Keys"}
|
||||
use {"Thyrum/vim-stabs"}
|
||||
use {"mbbill/undotree"}
|
||||
-- Custom
|
||||
use({ "wesleimp/stylua.nvim" })
|
||||
use({ "cappyzawa/trim.nvim" })
|
||||
use({ "ap/vim-css-color" })
|
||||
use({ "tpope/vim-fugitive" })
|
||||
use({ "airblade/vim-gitgutter" })
|
||||
use({ "ctrlpvim/ctrlp.vim" })
|
||||
use({ "lyuts/vim-rtags" })
|
||||
use({ "wakatime/vim-wakatime" })
|
||||
use({ "mboughaba/i3config.vim" })
|
||||
use({ "The-Repo-Club/header.nvim" })
|
||||
use({ "The-Repo-Club/Vim_Keys" })
|
||||
use({ "Thyrum/vim-stabs" })
|
||||
use({ "mbbill/undotree" })
|
||||
|
||||
-- Automatically set up your configuration after cloning packer.nvim
|
||||
-- Put this at the end after all plugins
|
||||
if PACKER_BOOTSTRAP then require("packer").sync() end
|
||||
-- Automatically set up your configuration after cloning packer.nvim
|
||||
-- Put this at the end after all plugins
|
||||
if PACKER_BOOTSTRAP then
|
||||
require("packer").sync()
|
||||
end
|
||||
end)
|
||||
|
@ -4,14 +4,14 @@ if not status_ok then
|
||||
end
|
||||
|
||||
trim.setup({
|
||||
-- if you want to ignore markdown file.
|
||||
-- you can specify filetypes.
|
||||
disable = {"markdown"},
|
||||
-- if you want to ignore markdown file.
|
||||
-- you can specify filetypes.
|
||||
disable = { "markdown" },
|
||||
|
||||
-- if you want to ignore space of top
|
||||
patterns = {
|
||||
[[%s/\s\+$//e]],
|
||||
[[%s/\($\n\s*\)\+\%$//]],
|
||||
[[%s/\(\n\n\)\n\+/\1/]],
|
||||
},
|
||||
-- if you want to ignore space of top
|
||||
patterns = {
|
||||
[[%s/\s\+$//e]],
|
||||
[[%s/\($\n\s*\)\+\%$//]],
|
||||
[[%s/\(\n\n\)\n\+/\1/]],
|
||||
},
|
||||
})
|
@ -229,6 +229,11 @@ _G.packer_plugins = {
|
||||
path = "/home/repo/.local/share/nvim/site/pack/packer/start/project.nvim",
|
||||
url = "https://github.com/ahmedkhalf/project.nvim"
|
||||
},
|
||||
["stylua.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/repo/.local/share/nvim/site/pack/packer/start/stylua.nvim",
|
||||
url = "https://github.com/wesleimp/stylua.nvim"
|
||||
},
|
||||
["telescope.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/repo/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
||||
|
Loading…
Reference in New Issue
Block a user