added conform formatter and formatted all files
This commit is contained in:
parent
6c68f8d6c7
commit
e5602dd693
6
init.lua
6
init.lua
|
@ -1,7 +1,7 @@
|
||||||
require('bootstrap')
|
require("bootstrap")
|
||||||
|
|
||||||
-- load options
|
-- load options
|
||||||
local options = require('options')
|
local options = require("options")
|
||||||
|
|
||||||
-- set neovim options
|
-- set neovim options
|
||||||
for k, v in pairs(options.vim) do
|
for k, v in pairs(options.vim) do
|
||||||
|
@ -16,7 +16,7 @@ if not status then
|
||||||
end
|
end
|
||||||
|
|
||||||
-- apply keymap
|
-- apply keymap
|
||||||
local keymap = require('keymap')
|
local keymap = require("keymap")
|
||||||
for _, v in pairs(keymap) do
|
for _, v in pairs(keymap) do
|
||||||
vim.keymap.set(v[1], v[2], v[3], v[4])
|
vim.keymap.set(v[1], v[2], v[3], v[4])
|
||||||
end
|
end
|
||||||
|
|
|
@ -17,22 +17,22 @@ local options = require("options")
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
{
|
{
|
||||||
import = "plugins"
|
import = "plugins",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
install = {
|
install = {
|
||||||
missing = options.lazy.install_missing,
|
missing = options.lazy.install_missing,
|
||||||
colorscheme = {
|
colorscheme = {
|
||||||
options.ui.theme
|
options.ui.theme,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
ui = {
|
ui = {
|
||||||
size = {
|
size = {
|
||||||
width = options.ui.popup.width,
|
width = options.ui.popup.width,
|
||||||
height = options.ui.popup.height
|
height = options.ui.popup.height,
|
||||||
},
|
},
|
||||||
border = options.ui.border,
|
border = options.ui.border,
|
||||||
wrap = true,
|
wrap = true,
|
||||||
icons = options.lazy.icons,
|
icons = options.lazy.icons,
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
|
|
108
lua/keymap.lua
108
lua/keymap.lua
|
@ -1,66 +1,128 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
{ 'i', 'x', 'n', 's' }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" }
|
{ "i", "x", "n", "s" },
|
||||||
|
"<C-s>",
|
||||||
|
"<cmd>w<cr><esc>",
|
||||||
|
{ desc = "Save file" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n' }, "<C-t>", "<cmd>enew<cr>", { desc = "New File" }
|
{ "n" },
|
||||||
|
"<C-t>",
|
||||||
|
"<cmd>enew<cr>",
|
||||||
|
{ desc = "New File" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n', 'i' }, '<C-z>', '<cmd>u<CR>', { desc = "Undo" }
|
{ "n", "i" },
|
||||||
|
"<C-z>",
|
||||||
|
"<cmd>u<CR>",
|
||||||
|
{ desc = "Undo" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n', 'i' }, '<C-y>', '<cmd>redo<CR>', { desc = "Undo" }
|
{ "n", "i" },
|
||||||
|
"<C-y>",
|
||||||
|
"<cmd>redo<CR>",
|
||||||
|
{ desc = "Undo" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n', 'i' }, '<S-tab>', '<cmd><<CR>', { desc = "Remove Tab" }
|
{ "n", "i" },
|
||||||
|
"<S-tab>",
|
||||||
|
"<cmd><<CR>",
|
||||||
|
{ desc = "Remove Tab" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n', 'i' }, '<C-g>', '<cmd>Telescope<CR>', { desc = "Open Telescope" }
|
{ "n", "i" },
|
||||||
|
"<C-g>",
|
||||||
|
"<cmd>Telescope<CR>",
|
||||||
|
{ desc = "Open Telescope" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n', 'i' }, '<S-ScrollWheelUp>', '<ScrollWheelLeft>', { desc = "Scroll sideways" }
|
{ "n", "i" },
|
||||||
|
"<S-ScrollWheelUp>",
|
||||||
|
"<ScrollWheelLeft>",
|
||||||
|
{ desc = "Scroll sideways" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n', 'i' }, '<S-ScrollWheelDown>', '<ScrollWheelRight>', { desc = "Scroll sideways" }
|
{ "n", "i" },
|
||||||
|
"<S-ScrollWheelDown>",
|
||||||
|
"<ScrollWheelRight>",
|
||||||
|
{ desc = "Scroll sideways" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n' }, "<S-Tab>", "<cmd>BufferPrevious<CR>", { desc = "Next Tab", silent = false }
|
{ "n" },
|
||||||
|
"<S-Tab>",
|
||||||
|
"<cmd>BufferPrevious<CR>",
|
||||||
|
{ desc = "Next Tab", silent = false },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n' }, "<Tab>", "<cmd>BufferNext<CR>", { desc = "Previous Tab", silent = false }
|
{ "n" },
|
||||||
|
"<Tab>",
|
||||||
|
"<cmd>BufferNext<CR>",
|
||||||
|
{ desc = "Previous Tab", silent = false },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n' }, '<C-w>', '', { desc = "Disable STRG+w" }
|
{ "n" },
|
||||||
|
"<C-w>",
|
||||||
|
"",
|
||||||
|
{ desc = "Disable STRG+w" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n' }, '<C-w>v', '<cmd>vsplit<CR>', { desc = "Split Vertical", noremap = true }
|
{ "n" },
|
||||||
|
"<C-w>v",
|
||||||
|
"<cmd>vsplit<CR>",
|
||||||
|
{ desc = "Split Vertical", noremap = true },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n' }, '<C-w>h', '<cmd>split<CR>', { desc = "Split Horizontal", noremap = true }
|
{ "n" },
|
||||||
|
"<C-w>h",
|
||||||
|
"<cmd>split<CR>",
|
||||||
|
{ desc = "Split Horizontal", noremap = true },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n' }, '<C-w>q', '<cmd>BufferClose<CR>', { desc = "Quit Window" }
|
{ "n" },
|
||||||
|
"<C-w>q",
|
||||||
|
"<cmd>BufferClose<CR>",
|
||||||
|
{ desc = "Quit Window" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n' }, '<C-w><Left>', '<cmd>wincmd h<CR>', { desc = "Window Left" }
|
{ "n" },
|
||||||
|
"<C-w><Left>",
|
||||||
|
"<cmd>wincmd h<CR>",
|
||||||
|
{ desc = "Window Left" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n' }, '<C-w><Down>', '<cmd>wincmd j<CR>', { desc = "Window Down" }
|
{ "n" },
|
||||||
|
"<C-w><Down>",
|
||||||
|
"<cmd>wincmd j<CR>",
|
||||||
|
{ desc = "Window Down" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n' }, '<C-w><Up>', '<cmd>wincmd k<CR>', { desc = "Window Up" }
|
{ "n" },
|
||||||
|
"<C-w><Up>",
|
||||||
|
"<cmd>wincmd k<CR>",
|
||||||
|
{ desc = "Window Up" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n' }, '<C-w><Right>', '<cmd>wincmd l<CR>', { desc = "Window Right" }
|
{ "n" },
|
||||||
|
"<C-w><Right>",
|
||||||
|
"<cmd>wincmd l<CR>",
|
||||||
|
{ desc = "Window Right" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n', 'i' }, '<C-b>', '<cmd>NvimTreeToggle<CR>', { desc = "Toggle Neotree" }
|
{ "n", "i" },
|
||||||
|
"<C-b>",
|
||||||
|
"<cmd>NvimTreeToggle<CR>",
|
||||||
|
{ desc = "Toggle Neotree" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n' }, ':', '<cmd>Telescope cmdline<CR>', { noremap = true, desc = "Open Cmdline" }
|
{ "n" },
|
||||||
|
":",
|
||||||
|
"<cmd>Telescope cmdline<CR>",
|
||||||
|
{ noremap = true, desc = "Open Cmdline" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ 'n' }, '<leader><leader>', '<cmd>Telescope cmdline<CR>', { noremap = true, desc = "Open Cmdline" }
|
{ "n" },
|
||||||
}
|
"<leader><leader>",
|
||||||
|
"<cmd>Telescope cmdline<CR>",
|
||||||
|
{ noremap = true, desc = "Open Cmdline" },
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
return {
|
return {
|
||||||
vim = {
|
vim = {
|
||||||
swapfile = false, -- disable swap files cuz they are garbage
|
swapfile = false, -- disable swap files cuz they are garbage
|
||||||
clipboard = "unnamedplus", -- Sync with system clipboard
|
clipboard = "unnamedplus", -- Sync with system clipboard
|
||||||
expandtab = true, -- spaces instead of tabs
|
expandtab = true, -- spaces instead of tabs
|
||||||
shiftwidth = 4, -- tab width in spaces
|
shiftwidth = 4, -- tab width in spaces
|
||||||
tabstop = 4, -- Number of spaces tabs count for
|
tabstop = 4, -- Number of spaces tabs count for
|
||||||
completeopt = "menu,menuone,noselect",
|
completeopt = "menu,menuone,noselect",
|
||||||
confirm = true, -- Confirm to save changes before exiting modified buffer
|
confirm = true, -- Confirm to save changes before exiting modified buffer
|
||||||
cursorline = true, -- Enable highlighting of the current line
|
cursorline = true, -- Enable highlighting of the current line
|
||||||
ignorecase = true, -- Ignore case
|
ignorecase = true, -- Ignore case
|
||||||
mouse = "a", -- Enable mouse mode
|
mouse = "a", -- Enable mouse mode
|
||||||
number = true, -- Print line number
|
number = true, -- Print line number
|
||||||
pumblend = 0, -- Popup pseudo transparency
|
pumblend = 0, -- Popup pseudo transparency
|
||||||
pumheight = 12, -- Popup height
|
pumheight = 12, -- Popup height
|
||||||
showmode = false, -- Dont show mode since we have a statusline
|
showmode = false, -- Dont show mode since we have a statusline
|
||||||
smartindent = true, -- Insert indents automatically
|
smartindent = true, -- Insert indents automatically
|
||||||
termguicolors = true, -- True color support
|
termguicolors = true, -- True color support
|
||||||
virtualedit = "block", -- Allow cursor to move where there is no text in visual block mode
|
virtualedit = "block", -- Allow cursor to move where there is no text in visual block mode
|
||||||
wrap = false,
|
wrap = false,
|
||||||
foldcolumn = '1',
|
foldcolumn = "1",
|
||||||
foldlevel = 99,
|
foldlevel = 99,
|
||||||
foldlevelstart = 99,
|
foldlevelstart = 99,
|
||||||
foldenable = true,
|
foldenable = true,
|
||||||
|
@ -27,33 +27,33 @@ return {
|
||||||
foldclose = "",
|
foldclose = "",
|
||||||
fold = " ",
|
fold = " ",
|
||||||
foldsep = " ",
|
foldsep = " ",
|
||||||
diff = "╱",
|
diff = "╱",
|
||||||
eob = " ",
|
eob = " ",
|
||||||
horiz = '─',
|
horiz = "─",
|
||||||
horizup = '─',
|
horizup = "─",
|
||||||
horizdown = '─',
|
horizdown = "─",
|
||||||
vert = '▎',
|
vert = "▎",
|
||||||
vertleft = '▎',
|
vertleft = "▎",
|
||||||
vertright = '▎',
|
vertright = "▎",
|
||||||
verthoriz = '▎',
|
verthoriz = "▎",
|
||||||
},
|
},
|
||||||
mousemoveevent = true,
|
mousemoveevent = true,
|
||||||
laststatus = 3, -- global statusline
|
laststatus = 3, -- global statusline
|
||||||
},
|
},
|
||||||
ui = {
|
ui = {
|
||||||
theme = "vscode",
|
theme = "vscode",
|
||||||
border = "rounded",
|
border = "rounded",
|
||||||
popup = {
|
popup = {
|
||||||
width = 0.6,
|
width = 0.6,
|
||||||
height = 0.8
|
height = 0.8,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
lsp = {
|
lsp = {
|
||||||
icons = {
|
icons = {
|
||||||
Error = " ",
|
Error = " ",
|
||||||
Warn = " ",
|
Warn = " ",
|
||||||
Hint = " ",
|
Hint = " ",
|
||||||
Info = " ",
|
Info = " ",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
git = {
|
git = {
|
||||||
|
@ -63,7 +63,7 @@ return {
|
||||||
delete = "",
|
delete = "",
|
||||||
topdelete = "",
|
topdelete = "",
|
||||||
changedelete = "│",
|
changedelete = "│",
|
||||||
untracked = "│"
|
untracked = "│",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
lazy = {
|
lazy = {
|
||||||
|
|
|
@ -1,32 +1,35 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
'romgrk/barbar.nvim',
|
"romgrk/barbar.nvim",
|
||||||
init = function() vim.g.barbar_auto_setup = false end,
|
init = function()
|
||||||
opts = function ()
|
vim.g.barbar_auto_setup = false
|
||||||
local options = require('options')
|
end,
|
||||||
return {
|
opts = function()
|
||||||
animation = true,
|
local options = require("options")
|
||||||
tabpages = true,
|
return {
|
||||||
insert_at_end = true,
|
animation = true,
|
||||||
maximum_padding = 4,
|
tabpages = true,
|
||||||
sidebar_filetypes = {
|
insert_at_end = true,
|
||||||
NvimTree = true,
|
maximum_padding = 4,
|
||||||
},
|
sidebar_filetypes = {
|
||||||
clickable = true,
|
NvimTree = true,
|
||||||
pinned = {
|
},
|
||||||
button = '',
|
clickable = true,
|
||||||
filename = true
|
pinned = {
|
||||||
},
|
button = "",
|
||||||
icons = {
|
filename = true,
|
||||||
separator = {left = '▎', right = ''},
|
},
|
||||||
diagnostics = {
|
icons = {
|
||||||
[vim.diagnostic.severity.ERROR] = {enabled = true, icon = options.lsp.icons.Error},
|
separator = { left = "▎", right = "" },
|
||||||
[vim.diagnostic.severity.WARN] = {enabled = false, icon = options.lsp.icons.Warn},
|
diagnostics = {
|
||||||
[vim.diagnostic.severity.INFO] = {enabled = false, icon = options.lsp.icons.Info},
|
[vim.diagnostic.severity.ERROR] = { enabled = true, icon = options.lsp.icons.Error },
|
||||||
[vim.diagnostic.severity.HINT] = {enabled = true}, icon = options.lsp.icons.Hint},
|
[vim.diagnostic.severity.WARN] = { enabled = false, icon = options.lsp.icons.Warn },
|
||||||
|
[vim.diagnostic.severity.INFO] = { enabled = false, icon = options.lsp.icons.Info },
|
||||||
|
[vim.diagnostic.severity.HINT] = { enabled = true },
|
||||||
|
icon = options.lsp.icons.Hint,
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
end,
|
||||||
end
|
},
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@ return {
|
||||||
"lazyterm",
|
"lazyterm",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,90 +1,90 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
'hrsh7th/nvim-cmp',
|
"hrsh7th/nvim-cmp",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- extra completion plugins
|
-- extra completion plugins
|
||||||
'hrsh7th/cmp-cmdline',
|
"hrsh7th/cmp-cmdline",
|
||||||
'hrsh7th/cmp-path',
|
"hrsh7th/cmp-path",
|
||||||
'hrsh7th/cmp-buffer',
|
"hrsh7th/cmp-buffer",
|
||||||
'hrsh7th/cmp-nvim-lsp',
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
'hrsh7th/cmp-calc',
|
"hrsh7th/cmp-calc",
|
||||||
'hrsh7th/cmp-emoji',
|
"hrsh7th/cmp-emoji",
|
||||||
'kdheepak/cmp-latex-symbols',
|
"kdheepak/cmp-latex-symbols",
|
||||||
-- snippets
|
-- snippets
|
||||||
'saadparwaiz1/cmp_luasnip',
|
"saadparwaiz1/cmp_luasnip",
|
||||||
'L3MON4D3/LuaSnip',
|
"L3MON4D3/LuaSnip",
|
||||||
'onsails/lspkind.nvim'
|
"onsails/lspkind.nvim",
|
||||||
},
|
},
|
||||||
config = function(_, _)
|
config = function(_, _)
|
||||||
local cmp = require("cmp");
|
local cmp = require("cmp")
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
window = {
|
window = {
|
||||||
completion = {
|
completion = {
|
||||||
border = "single",
|
border = "single",
|
||||||
scrollbar = false,
|
scrollbar = false,
|
||||||
winhighlight = "Normal:CmpPmenu,FloatBorder:FloatBorder,Search:None"
|
winhighlight = "Normal:CmpPmenu,FloatBorder:FloatBorder,Search:None",
|
||||||
},
|
},
|
||||||
documentation = {
|
documentation = {
|
||||||
border = "single",
|
border = "single",
|
||||||
scrollbar = false,
|
scrollbar = false,
|
||||||
winhighlight = "Normal:CmpPmenu,FloatBorder:FloatBorder,Search:None"
|
winhighlight = "Normal:CmpPmenu,FloatBorder:FloatBorder,Search:None",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
require('luasnip').lsp_expand(args.body)
|
require("luasnip").lsp_expand(args.body)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
completion = {
|
completion = {
|
||||||
preselect = 'none',
|
preselect = "none",
|
||||||
completeopt = "menu,menuone,noinser",
|
completeopt = "menu,menuone,noinser",
|
||||||
},
|
},
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = 'nvim_lsp' },
|
{ name = "nvim_lsp" },
|
||||||
{ name = 'nvim_lsp_signature_help' },
|
{ name = "nvim_lsp_signature_help" },
|
||||||
{ name = 'vsnip' },
|
{ name = "vsnip" },
|
||||||
{ name = 'buffer' },
|
{ name = "buffer" },
|
||||||
{ name = "path" },
|
{ name = "path" },
|
||||||
{ name = 'calc' },
|
{ name = "calc" },
|
||||||
}, {
|
}, {
|
||||||
{ name = 'emoji' },
|
{ name = "emoji" },
|
||||||
{ name = "cmdline" },
|
{ name = "cmdline" },
|
||||||
{ name = "latex_symbols" }
|
{ name = "latex_symbols" },
|
||||||
}),
|
}),
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
['<C-e>'] = cmp.mapping.abort(),
|
["<C-e>"] = cmp.mapping.abort(),
|
||||||
["<CR>"] = cmp.mapping({
|
["<CR>"] = cmp.mapping({
|
||||||
i = function(fallback)
|
i = function(fallback)
|
||||||
if cmp.visible() and cmp.get_active_entry() then
|
if cmp.visible() and cmp.get_active_entry() then
|
||||||
cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false })
|
cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false })
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
s = cmp.mapping.confirm({ select = true }),
|
s = cmp.mapping.confirm({ select = true }),
|
||||||
c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
|
c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
formatting = {
|
formatting = {
|
||||||
fields = { "kind", "abbr", "menu" },
|
fields = { "kind", "abbr", "menu" },
|
||||||
format = function(entry, item)
|
format = function(entry, item)
|
||||||
local kind = require("lspkind").cmp_format({ mode = "symbol_text", maxwidth = 50 })(entry, item)
|
local kind = require("lspkind").cmp_format({ mode = "symbol_text", maxwidth = 50 })(entry, item)
|
||||||
local strings = vim.split(kind.kind, "%s", { trimempty = true })
|
local strings = vim.split(kind.kind, "%s", { trimempty = true })
|
||||||
kind.kind = (strings[1] or "") .. " "
|
kind.kind = (strings[1] or "") .. " "
|
||||||
kind.menu = " (" .. (strings[2] or "") .. ")"
|
kind.menu = " (" .. (strings[2] or "") .. ")"
|
||||||
|
|
||||||
return kind
|
return kind
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
experimental = {
|
experimental = {
|
||||||
ghost_text = {
|
ghost_text = {
|
||||||
hl_group = "NonText",
|
hl_group = "NonText",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
opts = {
|
||||||
|
format_on_save = {
|
||||||
|
-- These options will be passed to conform.format()
|
||||||
|
timeout_ms = 500,
|
||||||
|
lsp_fallback = true,
|
||||||
|
},
|
||||||
|
formatters = {
|
||||||
|
injected = { options = { ignore_errors = true } },
|
||||||
|
},
|
||||||
|
formatters_by_ft = {
|
||||||
|
lua = { "stylua" },
|
||||||
|
sh = { "shfmt" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -2,7 +2,7 @@ return {
|
||||||
{
|
{
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
opts = function()
|
opts = function()
|
||||||
local options = require('options')
|
local options = require("options")
|
||||||
return {
|
return {
|
||||||
signs = {
|
signs = {
|
||||||
add = { text = options.git.icons.add },
|
add = { text = options.git.icons.add },
|
||||||
|
@ -14,11 +14,9 @@ return {
|
||||||
},
|
},
|
||||||
signcolumn = true,
|
signcolumn = true,
|
||||||
preview_config = {
|
preview_config = {
|
||||||
border = 'rounded'
|
border = "rounded",
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
end
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"RRethy/vim-illuminate",
|
"RRethy/vim-illuminate",
|
||||||
config = function (_, _)
|
config = function(_, _)
|
||||||
require('illuminate').configure({
|
require("illuminate").configure({})
|
||||||
|
end,
|
||||||
})
|
},
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,27 +3,27 @@ return {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
"williamboman/mason-lspconfig.nvim"
|
"williamboman/mason-lspconfig.nvim",
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
underline = true,
|
underline = true,
|
||||||
update_in_insert = true,
|
update_in_insert = true,
|
||||||
virtual_text = {
|
virtual_text = {
|
||||||
spacing = 4,
|
spacing = 4,
|
||||||
source = "if_many",
|
source = "if_many",
|
||||||
prefix = "●",
|
prefix = "●",
|
||||||
},
|
},
|
||||||
severity_sort = true,
|
severity_sort = true,
|
||||||
signs = {
|
signs = {
|
||||||
text = {
|
text = {
|
||||||
[vim.diagnostic.severity.ERROR] = require("options").lsp.icons.Error,
|
[vim.diagnostic.severity.ERROR] = require("options").lsp.icons.Error,
|
||||||
[vim.diagnostic.severity.WARN] = require("options").lsp.icons.Warn,
|
[vim.diagnostic.severity.WARN] = require("options").lsp.icons.Warn,
|
||||||
[vim.diagnostic.severity.HINT] = require("options").lsp.icons.Hint,
|
[vim.diagnostic.severity.HINT] = require("options").lsp.icons.Hint,
|
||||||
[vim.diagnostic.severity.INFO] = require("options").lsp.icons.Info,
|
[vim.diagnostic.severity.INFO] = require("options").lsp.icons.Info,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
local options = require("options")
|
local options = require("options")
|
||||||
|
@ -32,10 +32,10 @@ return {
|
||||||
|
|
||||||
local handlers = {
|
local handlers = {
|
||||||
-- The first entry (without a key) will be the default handler
|
-- The first entry (without a key) will be the default handler
|
||||||
-- and will be called for each installed server that doesn't have
|
-- and will be called for each installed server that doesn't have
|
||||||
-- a dedicated handler.
|
-- a dedicated handler.
|
||||||
function (server_name) -- default handler (optional)
|
function(server_name) -- default handler (optional)
|
||||||
require("lspconfig")[server_name].setup {}
|
require("lspconfig")[server_name].setup({})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,8 +48,8 @@ return {
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.diagnostic.config(vim.deepcopy(opts.diagnostics))
|
vim.diagnostic.config(vim.deepcopy(opts.diagnostics))
|
||||||
|
|
||||||
require'lspconfig'.gdscript.setup{}
|
require("lspconfig").gdscript.setup({})
|
||||||
end
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,132 +2,131 @@ return {
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
opts = function()
|
opts = function()
|
||||||
local options = require('options')
|
local options = require("options")
|
||||||
return {
|
return {
|
||||||
options = {
|
options = {
|
||||||
theme = "vscode",
|
theme = "vscode",
|
||||||
component_separators = { left = '', right = '' },
|
component_separators = { left = "", right = "" },
|
||||||
section_separators = { left = '', right = '' },
|
section_separators = { left = "", right = "" },
|
||||||
globalstatus = true
|
globalstatus = true,
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = {
|
|
||||||
{
|
|
||||||
function ()
|
|
||||||
return ' '
|
|
||||||
end,
|
|
||||||
separator = { left = '', right = '' },
|
|
||||||
padding = 1,
|
|
||||||
fmt = function (text)
|
|
||||||
return string.gsub(text, "%s+", "")
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'mode',
|
|
||||||
padding = 0,
|
|
||||||
fmt = function (text)
|
|
||||||
return string.gsub(text, "%s+", "") .. ' '
|
|
||||||
end
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
lualine_b = {
|
sections = {
|
||||||
{
|
lualine_a = {
|
||||||
'filename',
|
{
|
||||||
symbols = {
|
function()
|
||||||
modified = '', -- Text to show when the file is modified.
|
return " "
|
||||||
readonly = '', -- Text to show when the file is non-modifiable or readonly.
|
end,
|
||||||
unnamed = '', -- Text to show for unnamed buffers.
|
separator = { left = "", right = "" },
|
||||||
newfile = '[New]', -- Text to show for newly created file before first write
|
padding = 1,
|
||||||
}
|
fmt = function(text)
|
||||||
}
|
return string.gsub(text, "%s+", "")
|
||||||
},
|
end,
|
||||||
lualine_c = {
|
|
||||||
{
|
|
||||||
'branch',
|
|
||||||
icon = ''
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'diff',
|
|
||||||
symbols = {
|
|
||||||
added = '+',
|
|
||||||
modified = '~',
|
|
||||||
removed = '-',
|
|
||||||
},
|
},
|
||||||
on_click = function ()
|
{
|
||||||
vim.defer_fn(function()
|
"mode",
|
||||||
vim.cmd("Gitsigns diffthis")
|
padding = 0,
|
||||||
end, 100)
|
fmt = function(text)
|
||||||
end,
|
return string.gsub(text, "%s+", "") .. " "
|
||||||
},
|
end,
|
||||||
},
|
|
||||||
lualine_x = {
|
|
||||||
{
|
|
||||||
function ()
|
|
||||||
local client_id = vim.lsp.get_client_by_id(1)
|
|
||||||
return ' LSP ~ ' .. client_id.name
|
|
||||||
end,
|
|
||||||
on_click = function ()
|
|
||||||
vim.defer_fn(function()
|
|
||||||
vim.cmd("LspInfo")
|
|
||||||
end, 100)
|
|
||||||
end,
|
|
||||||
color = 'lualine_c_inactive'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'diagnostics',
|
|
||||||
symbols = {
|
|
||||||
error = options.lsp.icons.Error,
|
|
||||||
warn = options.lsp.icons.Warn,
|
|
||||||
info = options.lsp.icons.Info,
|
|
||||||
hint = options.lsp.icons.Hint,
|
|
||||||
},
|
},
|
||||||
sources = {
|
},
|
||||||
'nvim_diagnostic'
|
lualine_b = {
|
||||||
|
{
|
||||||
|
"filename",
|
||||||
|
symbols = {
|
||||||
|
modified = "", -- Text to show when the file is modified.
|
||||||
|
readonly = "", -- Text to show when the file is non-modifiable or readonly.
|
||||||
|
unnamed = "", -- Text to show for unnamed buffers.
|
||||||
|
newfile = "[New]", -- Text to show for newly created file before first write
|
||||||
|
},
|
||||||
},
|
},
|
||||||
update_in_insert = true,
|
|
||||||
on_click = function ()
|
|
||||||
vim.defer_fn(function()
|
|
||||||
vim.cmd("TroubleToggle")
|
|
||||||
end, 100)
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
{
|
lualine_c = {
|
||||||
'filetype',
|
{
|
||||||
colored = true,
|
"branch",
|
||||||
on_click = function(_, _)
|
icon = "",
|
||||||
vim.defer_fn(function()
|
},
|
||||||
vim.cmd("Telescope filetypes")
|
{
|
||||||
end, 100)
|
"diff",
|
||||||
end
|
symbols = {
|
||||||
|
added = "+",
|
||||||
|
modified = "~",
|
||||||
|
removed = "-",
|
||||||
|
},
|
||||||
|
on_click = function()
|
||||||
|
vim.defer_fn(function()
|
||||||
|
vim.cmd("Gitsigns diffthis")
|
||||||
|
end, 100)
|
||||||
|
end,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
'encoding',
|
lualine_x = {
|
||||||
'fileformat'
|
{
|
||||||
|
function()
|
||||||
|
local client_id = vim.lsp.get_client_by_id(1)
|
||||||
|
return " LSP ~ " .. client_id.name
|
||||||
|
end,
|
||||||
|
on_click = function()
|
||||||
|
vim.defer_fn(function()
|
||||||
|
vim.cmd("LspInfo")
|
||||||
|
end, 100)
|
||||||
|
end,
|
||||||
|
color = "lualine_c_inactive",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"diagnostics",
|
||||||
|
symbols = {
|
||||||
|
error = options.lsp.icons.Error,
|
||||||
|
warn = options.lsp.icons.Warn,
|
||||||
|
info = options.lsp.icons.Info,
|
||||||
|
hint = options.lsp.icons.Hint,
|
||||||
|
},
|
||||||
|
sources = {
|
||||||
|
"nvim_diagnostic",
|
||||||
|
},
|
||||||
|
update_in_insert = true,
|
||||||
|
on_click = function()
|
||||||
|
vim.defer_fn(function()
|
||||||
|
vim.cmd("TroubleToggle")
|
||||||
|
end, 100)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filetype",
|
||||||
|
colored = true,
|
||||||
|
on_click = function(_, _)
|
||||||
|
vim.defer_fn(function()
|
||||||
|
vim.cmd("Telescope filetypes")
|
||||||
|
end, 100)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
"encoding",
|
||||||
|
"fileformat",
|
||||||
|
},
|
||||||
|
lualine_y = {
|
||||||
|
{ "progress" },
|
||||||
|
},
|
||||||
|
lualine_z = { "location" },
|
||||||
},
|
},
|
||||||
lualine_y = {
|
inactive_sections = {
|
||||||
{ 'progress' }
|
lualine_a = {},
|
||||||
|
lualine_b = {},
|
||||||
|
lualine_c = {
|
||||||
|
{
|
||||||
|
"filename",
|
||||||
|
symbols = {
|
||||||
|
modified = "", -- Text to show when the file is modified.
|
||||||
|
readonly = "", -- Text to show when the file is non-modifiable or readonly.
|
||||||
|
unnamed = "", -- Text to show for unnamed buffers.
|
||||||
|
newfile = "[New]", -- Text to show for newly created file before first write
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lualine_x = { "location" },
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = {},
|
||||||
},
|
},
|
||||||
lualine_z = {'location'}
|
|
||||||
},
|
|
||||||
inactive_sections = {
|
|
||||||
lualine_a = {},
|
|
||||||
lualine_b = {},
|
|
||||||
lualine_c = {
|
|
||||||
{
|
|
||||||
'filename',
|
|
||||||
symbols = {
|
|
||||||
modified = '', -- Text to show when the file is modified.
|
|
||||||
readonly = '', -- Text to show when the file is non-modifiable or readonly.
|
|
||||||
unnamed = '', -- Text to show for unnamed buffers.
|
|
||||||
newfile = '[New]', -- Text to show for newly created file before first write
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
lualine_x = {'location'},
|
|
||||||
lualine_y = {},
|
|
||||||
lualine_z = {}
|
|
||||||
}
|
}
|
||||||
}
|
end,
|
||||||
end
|
},
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ return {
|
||||||
"rcarriga/nvim-notify", -- fancy notifications
|
"rcarriga/nvim-notify", -- fancy notifications
|
||||||
"MunifTanjim/nui.nvim", -- gui component library
|
"MunifTanjim/nui.nvim", -- gui component library
|
||||||
},
|
},
|
||||||
opts = function(_,_)
|
opts = function(_, _)
|
||||||
return {
|
return {
|
||||||
cmdline = {
|
cmdline = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
|
@ -14,22 +14,22 @@ return {
|
||||||
cmdline = {
|
cmdline = {
|
||||||
pattern = "^:",
|
pattern = "^:",
|
||||||
icon = " ",
|
icon = " ",
|
||||||
lang = "vim"
|
lang = "vim",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
win_options = {
|
win_options = {
|
||||||
winhighlight = {
|
winhighlight = {
|
||||||
FloatBorder = "LspInfoBorder"
|
FloatBorder = "LspInfoBorder",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
position = {
|
position = {
|
||||||
row = 5,
|
row = 5,
|
||||||
col = "50%",
|
col = "50%",
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
end
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ return {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
hijack_directories = {
|
hijack_directories = {
|
||||||
enable = true
|
enable = true,
|
||||||
},
|
},
|
||||||
renderer = {
|
renderer = {
|
||||||
highlight_git = true,
|
highlight_git = true,
|
||||||
|
@ -33,8 +33,8 @@ return {
|
||||||
},
|
},
|
||||||
view = {
|
view = {
|
||||||
signcolumn = "no",
|
signcolumn = "no",
|
||||||
width = 45
|
width = 45,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ return {
|
||||||
"toggleterm",
|
"toggleterm",
|
||||||
"dashboard",
|
"dashboard",
|
||||||
"aerial",
|
"aerial",
|
||||||
"NvimTree"
|
"NvimTree",
|
||||||
},
|
},
|
||||||
segments = {
|
segments = {
|
||||||
-- diagnostic signs
|
-- diagnostic signs
|
||||||
|
@ -17,10 +17,10 @@ return {
|
||||||
sign = {
|
sign = {
|
||||||
name = { "Diagnostic" },
|
name = { "Diagnostic" },
|
||||||
colwidth = 2,
|
colwidth = 2,
|
||||||
maxwidth = 1
|
maxwidth = 1,
|
||||||
},
|
},
|
||||||
auto = true,
|
auto = true,
|
||||||
click = "v:lua.ScSa"
|
click = "v:lua.ScSa",
|
||||||
},
|
},
|
||||||
-- line numbers
|
-- line numbers
|
||||||
{
|
{
|
||||||
|
@ -30,16 +30,15 @@ return {
|
||||||
-- folds
|
-- folds
|
||||||
{
|
{
|
||||||
text = { builtin.foldfunc },
|
text = { builtin.foldfunc },
|
||||||
click = "v:lua.ScFa"
|
click = "v:lua.ScFa",
|
||||||
},
|
},
|
||||||
-- git signs
|
-- git signs
|
||||||
{
|
{
|
||||||
sign = { namespace = { "gitsigns" } },
|
sign = { namespace = { "gitsigns" } },
|
||||||
click = "v:lua.ScSa"
|
click = "v:lua.ScSa",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@ return {
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"sharkdp/fd",
|
"sharkdp/fd",
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
'nvim-tree/nvim-web-devicons',
|
"nvim-tree/nvim-web-devicons",
|
||||||
-- extensionsdiff
|
-- extensionsdiff
|
||||||
'jonarrien/telescope-cmdline.nvim',
|
"jonarrien/telescope-cmdline.nvim",
|
||||||
"debugloop/telescope-undo.nvim",
|
"debugloop/telescope-undo.nvim",
|
||||||
},
|
},
|
||||||
tag = "0.1.6",
|
tag = "0.1.6",
|
||||||
|
@ -14,26 +14,22 @@ return {
|
||||||
defaults = {
|
defaults = {
|
||||||
layout_strategy = "horizontal",
|
layout_strategy = "horizontal",
|
||||||
layout_config = {
|
layout_config = {
|
||||||
prompt_position = "top"
|
prompt_position = "top",
|
||||||
},
|
},
|
||||||
sorting_strategy = "ascending",
|
sorting_strategy = "ascending",
|
||||||
winblend = 0,
|
winblend = 0,
|
||||||
theme = "dropdown"
|
theme = "dropdown",
|
||||||
},
|
},
|
||||||
extensions = {
|
extensions = {
|
||||||
cmdline = {
|
cmdline = {},
|
||||||
},
|
undo = {},
|
||||||
undo = {
|
|
||||||
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require('telescope').setup(opts)
|
require("telescope").setup(opts)
|
||||||
|
|
||||||
require("telescope").load_extension("cmdline")
|
require("telescope").load_extension("cmdline")
|
||||||
require("telescope").load_extension("undo")
|
require("telescope").load_extension("undo")
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
event = {
|
event = {
|
||||||
"VeryLazy"
|
"VeryLazy",
|
||||||
},
|
},
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||||
|
@ -30,10 +30,10 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
indent = {
|
indent = {
|
||||||
enable = true
|
enable = true,
|
||||||
},
|
},
|
||||||
autotag = {
|
autotag = {
|
||||||
enable = true
|
enable = true,
|
||||||
},
|
},
|
||||||
textobjects = {
|
textobjects = {
|
||||||
move = {
|
move = {
|
||||||
|
@ -47,6 +47,6 @@ return {
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require("nvim-treesitter.configs").setup(opts)
|
require("nvim-treesitter.configs").setup(opts)
|
||||||
end
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
return {
|
return {
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
opts = function (_)
|
opts = function(_)
|
||||||
local options = require('options')
|
local options = require("options")
|
||||||
return {
|
return {
|
||||||
padding = false,
|
padding = false,
|
||||||
indent_lines = false,
|
indent_lines = false,
|
||||||
auto_jump = { },
|
auto_jump = {},
|
||||||
signs = {
|
signs = {
|
||||||
error = options.lsp.icons.Error,
|
error = options.lsp.icons.Error,
|
||||||
warning = options.lsp.icons.Warn,
|
warning = options.lsp.icons.Warn,
|
||||||
|
@ -15,5 +15,5 @@ return {
|
||||||
other = options.lsp.icons.Info,
|
other = options.lsp.icons.Info,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,10 @@ return {
|
||||||
{
|
{
|
||||||
"kevinhwang91/nvim-ufo",
|
"kevinhwang91/nvim-ufo",
|
||||||
event = {
|
event = {
|
||||||
"InsertEnter"
|
"InsertEnter",
|
||||||
},
|
},
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"kevinhwang91/promise-async"
|
"kevinhwang91/promise-async",
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
preview = {
|
preview = {
|
||||||
|
@ -18,8 +18,8 @@ return {
|
||||||
},
|
},
|
||||||
-- register treesitter as source for scopes
|
-- register treesitter as source for scopes
|
||||||
provider_selector = function(_, _, _)
|
provider_selector = function(_, _, _)
|
||||||
return { 'treesitter', 'indent' }
|
return { "treesitter", "indent" }
|
||||||
end
|
end,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,6 @@ return {
|
||||||
style = "dark",
|
style = "dark",
|
||||||
transparent = true,
|
transparent = true,
|
||||||
italic_comments = false,
|
italic_comments = false,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,19 +2,19 @@
|
||||||
|
|
||||||
printf "Continue copying files and removing current for Neovim (y/n)? "
|
printf "Continue copying files and removing current for Neovim (y/n)? "
|
||||||
read -r choice
|
read -r choice
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
y|Y )
|
y | Y)
|
||||||
echo "removing current neovim config..."
|
echo "removing current neovim config..."
|
||||||
rm -rfv ~/.config/nvim/*
|
rm -rfv ~/.config/nvim/*
|
||||||
echo "copying files..."
|
echo "copying files..."
|
||||||
cp -rv * ~/.config/nvim/
|
cp -rv * ~/.config/nvim/
|
||||||
;;
|
;;
|
||||||
n|N )
|
n | N)
|
||||||
echo "aborting..."
|
echo "aborting..."
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
* )
|
*)
|
||||||
echo "invalid"
|
echo "invalid"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue