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