autoforamtted everything
This commit is contained in:
parent
1dc2308a1f
commit
622145d183
12 changed files with 184 additions and 195 deletions
|
@ -1,9 +1,8 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"echasnovski/mini.comment",
|
"echasnovski/mini.comment",
|
||||||
config = function ()
|
config = function()
|
||||||
require("mini.comment").setup()
|
require("mini.comment").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ return {
|
||||||
{
|
{
|
||||||
'lewis6991/gitsigns.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
config = function ()
|
config = function()
|
||||||
require('gitsigns').setup({
|
require('gitsigns').setup({
|
||||||
preview_config = {
|
preview_config = {
|
||||||
border = 'rounded',
|
border = 'rounded',
|
||||||
|
@ -21,29 +21,29 @@ return {
|
||||||
if vim.wo.diff then return ']c' end
|
if vim.wo.diff then return ']c' end
|
||||||
vim.schedule(function() gs.next_hunk() end)
|
vim.schedule(function() gs.next_hunk() end)
|
||||||
return '<Ignore>'
|
return '<Ignore>'
|
||||||
end, {expr=true})
|
end, { expr = true })
|
||||||
|
|
||||||
map('n', '[c', function()
|
map('n', '[c', function()
|
||||||
if vim.wo.diff then return '[c' end
|
if vim.wo.diff then return '[c' end
|
||||||
vim.schedule(function() gs.prev_hunk() end)
|
vim.schedule(function() gs.prev_hunk() end)
|
||||||
return '<Ignore>'
|
return '<Ignore>'
|
||||||
end, {expr=true})
|
end, { expr = true })
|
||||||
|
|
||||||
-- Actions
|
-- Actions
|
||||||
map({'n', 'v'}, '<leader>hs', ':Gitsigns stage_hunk<CR>')
|
map({ 'n', 'v' }, '<leader>hs', ':Gitsigns stage_hunk<CR>')
|
||||||
map({'n', 'v'}, '<leader>hr', ':Gitsigns reset_hunk<CR>')
|
map({ 'n', 'v' }, '<leader>hr', ':Gitsigns reset_hunk<CR>')
|
||||||
map('n', '<leader>hS', gs.stage_buffer)
|
map('n', '<leader>hS', gs.stage_buffer)
|
||||||
map('n', '<leader>hu', gs.undo_stage_hunk)
|
map('n', '<leader>hu', gs.undo_stage_hunk)
|
||||||
map('n', '<leader>hR', gs.reset_buffer)
|
map('n', '<leader>hR', gs.reset_buffer)
|
||||||
map('n', '<leader>hp', gs.preview_hunk)
|
map('n', '<leader>hp', gs.preview_hunk)
|
||||||
map('n', '<leader>hb', function() gs.blame_line{full=true} end)
|
map('n', '<leader>hb', function() gs.blame_line { full = true } end)
|
||||||
map('n', '<leader>tb', gs.toggle_current_line_blame)
|
map('n', '<leader>tb', gs.toggle_current_line_blame)
|
||||||
map('n', '<leader>hd', gs.diffthis)
|
map('n', '<leader>hd', gs.diffthis)
|
||||||
map('n', '<leader>hD', function() gs.diffthis('~') end)
|
map('n', '<leader>hD', function() gs.diffthis('~') end)
|
||||||
map('n', '<leader>td', gs.toggle_deleted)
|
map('n', '<leader>td', gs.toggle_deleted)
|
||||||
|
|
||||||
-- Text object
|
-- Text object
|
||||||
map({'o', 'x'}, 'ih', ':<C-U>Gitsigns select_hunk<CR>')
|
map({ 'o', 'x' }, 'ih', ':<C-U>Gitsigns select_hunk<CR>')
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -16,50 +16,49 @@ return {
|
||||||
-- Settings to override colorscheme
|
-- Settings to override colorscheme
|
||||||
-- vim.api.nvim_set_hl(0, "ModeMsg", { bold = true, fg = "#d8a657"})
|
-- vim.api.nvim_set_hl(0, "ModeMsg", { bold = true, fg = "#d8a657"})
|
||||||
-- colors of tabline
|
-- colors of tabline
|
||||||
vim.api.nvim_set_hl(0, "TabLine", {bg = "#3c3836", fg = "#89b482"})
|
vim.api.nvim_set_hl(0, "TabLine", { bg = "#3c3836", fg = "#89b482" })
|
||||||
vim.api.nvim_set_hl(0, "TabLineFil", {bg = "#1d2021"})
|
vim.api.nvim_set_hl(0, "TabLineFil", { bg = "#1d2021" })
|
||||||
vim.api.nvim_set_hl(0, "TabLineSel", {bold = true, bg = "none", fg = "#d8a657"})
|
vim.api.nvim_set_hl(0, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" })
|
||||||
-- color of statusline
|
-- color of statusline
|
||||||
vim.api.nvim_set_hl(0, "StatusLine", {bold = false, bg = "#1d2021", fg = "#89b482"})
|
vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" })
|
||||||
vim.api.nvim_set_hl(0, "StatusLineNC", {bg = "#1d2021", fg = "#5b534d"})
|
vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" })
|
||||||
-- color of vertical split line
|
-- color of vertical split line
|
||||||
vim.api.nvim_set_hl(0, "VertSplit", {bg = "#141617", fg = "#141617"})
|
vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" })
|
||||||
-- color of the cursorline and cursorlinenumber
|
-- color of the cursorline and cursorlinenumber
|
||||||
vim.api.nvim_set_hl(0, "Cursorline", {bg = "#141617"})
|
vim.api.nvim_set_hl(0, "Cursorline", { bg = "#141617" })
|
||||||
vim.api.nvim_set_hl(0, "CursorLineNr", {bold = true, bg = "#141617", fg = "#d8a657"})
|
vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, bg = "#141617", fg = "#d8a657" })
|
||||||
-- color of Floats and FloatBorders
|
-- color of Floats and FloatBorders
|
||||||
vim.api.nvim_set_hl(0, "NormalFloat", {bg = none, fg = none })
|
vim.api.nvim_set_hl(0, "NormalFloat", { bg = none, fg = none })
|
||||||
vim.api.nvim_set_hl(0, "FloatBorder", {bg = none, fg = "#d4be98"})
|
vim.api.nvim_set_hl(0, "FloatBorder", { bg = none, fg = "#d4be98" })
|
||||||
vim.api.nvim_set_hl(0, "DiagnosticFloatingWarn", {bg = none, fg = "#d8a657"})
|
vim.api.nvim_set_hl(0, "DiagnosticFloatingWarn", { bg = none, fg = "#d8a657" })
|
||||||
vim.api.nvim_set_hl(0, "DiagnosticFloatingError", {bg = none, fg = "#ea6962"})
|
vim.api.nvim_set_hl(0, "DiagnosticFloatingError", { bg = none, fg = "#ea6962" })
|
||||||
vim.api.nvim_set_hl(0, "DiagnosticFloatingHint", {bg = none, fg = "#a9b665"})
|
vim.api.nvim_set_hl(0, "DiagnosticFloatingHint", { bg = none, fg = "#a9b665" })
|
||||||
vim.api.nvim_set_hl(0, "DiagnosticFloatingInfo", {bg = none, fg = "#d4be98"})
|
vim.api.nvim_set_hl(0, "DiagnosticFloatingInfo", { bg = none, fg = "#d4be98" })
|
||||||
|
|
||||||
-- autocommand for overrides
|
-- autocommand for overrides
|
||||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||||
pattern = "gruvbox-material",
|
pattern = "gruvbox-material",
|
||||||
callback = function ()
|
callback = function()
|
||||||
vim.api.nvim_set_hl(0, "TabLine", {bg = "#3c3836", fg = "#89b482"})
|
vim.api.nvim_set_hl(0, "TabLine", { bg = "#3c3836", fg = "#89b482" })
|
||||||
vim.api.nvim_set_hl(0, "TabLineFil", {bg = "#1d2021"})
|
vim.api.nvim_set_hl(0, "TabLineFil", { bg = "#1d2021" })
|
||||||
vim.api.nvim_set_hl(0, "TabLineSel", {bold = true, bg = "none", fg = "#d8a657"})
|
vim.api.nvim_set_hl(0, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" })
|
||||||
-- color of statusline
|
-- color of statusline
|
||||||
vim.api.nvim_set_hl(0, "StatusLine", {bold = false, bg = "#1d2021", fg = "#89b482"})
|
vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" })
|
||||||
vim.api.nvim_set_hl(0, "StatusLineNC", {bg = "#1d2021", fg = "#5b534d"})
|
vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" })
|
||||||
-- color of vertical split line
|
-- color of vertical split line
|
||||||
vim.api.nvim_set_hl(0, "VertSplit", {bg = "#141617", fg = "#141617"})
|
vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" })
|
||||||
-- color of the cursorline and cursorlinenumber
|
-- color of the cursorline and cursorlinenumber
|
||||||
vim.api.nvim_set_hl(0, "Cursorline", {bg = "#141617"})
|
vim.api.nvim_set_hl(0, "Cursorline", { bg = "#141617" })
|
||||||
vim.api.nvim_set_hl(0, "CursorLineNr", {bold = true, bg = "#141617", fg = "#d8a657"})
|
vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, bg = "#141617", fg = "#d8a657" })
|
||||||
-- color of Floats and FloatBorders
|
-- color of Floats and FloatBorders
|
||||||
vim.api.nvim_set_hl(0, "NormalFloat", {bg = none, fg = none })
|
vim.api.nvim_set_hl(0, "NormalFloat", { bg = none, fg = none })
|
||||||
vim.api.nvim_set_hl(0, "FloatBorder", {bg = none, fg = "#d4be98"})
|
vim.api.nvim_set_hl(0, "FloatBorder", { bg = none, fg = "#d4be98" })
|
||||||
vim.api.nvim_set_hl(0, "DiagnosticFloatingWarn", {bg = none, fg = "#d8a657"})
|
vim.api.nvim_set_hl(0, "DiagnosticFloatingWarn", { bg = none, fg = "#d8a657" })
|
||||||
vim.api.nvim_set_hl(0, "DiagnosticFloatingError", {bg = none, fg = "#ea6962"})
|
vim.api.nvim_set_hl(0, "DiagnosticFloatingError", { bg = none, fg = "#ea6962" })
|
||||||
vim.api.nvim_set_hl(0, "DiagnosticFloatingHint", {bg = none, fg = "#a9b665"})
|
vim.api.nvim_set_hl(0, "DiagnosticFloatingHint", { bg = none, fg = "#a9b665" })
|
||||||
vim.api.nvim_set_hl(0, "DiagnosticFloatingInfo", {bg = none, fg = "#d4be98"})
|
vim.api.nvim_set_hl(0, "DiagnosticFloatingInfo", { bg = none, fg = "#d4be98" })
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ return {
|
||||||
-- event = "BufReadPre",
|
-- event = "BufReadPre",
|
||||||
config = function()
|
config = function()
|
||||||
require('lspconfig.ui.windows').default_options.border = 'rounded'
|
require('lspconfig.ui.windows').default_options.border = 'rounded'
|
||||||
vim.api.nvim_set_hl(0, "LspInfoBorder", {bg = none, fg = "#d4be98"})
|
vim.api.nvim_set_hl(0, "LspInfoBorder", { bg = none, fg = "#d4be98" })
|
||||||
local opts = { noremap = true, silent = true }
|
local opts = { noremap = true, silent = true }
|
||||||
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
|
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
|
||||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
|
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
|
||||||
|
@ -61,7 +61,6 @@ return {
|
||||||
prefix = '●', -- Could be '●', '■', 'x', '▎'
|
prefix = '●', -- Could be '●', '■', 'x', '▎'
|
||||||
},
|
},
|
||||||
update_in_insert = true
|
update_in_insert = true
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- LSP settings (for overriding per client)
|
-- LSP settings (for overriding per client)
|
||||||
|
@ -115,4 +114,3 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ return {
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
vim.api.nvim_set_option("showmode",false)
|
vim.api.nvim_set_option("showmode", false)
|
||||||
local custom_gruvbox = require'lualine.themes.gruvbox-material'
|
local custom_gruvbox = require 'lualine.themes.gruvbox-material'
|
||||||
custom_gruvbox.normal.a.bg = '#89b482'
|
custom_gruvbox.normal.a.bg = '#89b482'
|
||||||
custom_gruvbox.normal.c.bg = '#141617'
|
custom_gruvbox.normal.c.bg = '#141617'
|
||||||
custom_gruvbox.insert.a.bg = '#d8a657'
|
custom_gruvbox.insert.a.bg = '#d8a657'
|
||||||
|
@ -16,26 +16,26 @@ return {
|
||||||
component_separators = ' '
|
component_separators = ' '
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = {'mode'},
|
lualine_a = { 'mode' },
|
||||||
lualine_b = {
|
lualine_b = {
|
||||||
{
|
{
|
||||||
'branch',
|
'branch',
|
||||||
icon = '',
|
icon = '',
|
||||||
color={fg='#d8a657', bg='#141617', gui='bold' },
|
color = { fg = '#d8a657', bg = '#141617', gui = 'bold' },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
lualine_c = {
|
lualine_c = {
|
||||||
{
|
{
|
||||||
'filename',
|
'filename',
|
||||||
color={gui='italic', fg='#d3869b', bg='#1d2021'},
|
color = { gui = 'italic', fg = '#d3869b', bg = '#1d2021' },
|
||||||
path = 1,
|
path = 1,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
{
|
{
|
||||||
'filetype',
|
'filetype',
|
||||||
color={bg='#1d2021', fg='#d4be98', gui='italic'},
|
color = { bg = '#1d2021', fg = '#d4be98', gui = 'italic' },
|
||||||
fmt = function (str)
|
fmt = function(str)
|
||||||
return (str:gsub("^%l", string.upper))
|
return (str:gsub("^%l", string.upper))
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ return {
|
||||||
lualine_y = {
|
lualine_y = {
|
||||||
{
|
{
|
||||||
'diagnostics',
|
'diagnostics',
|
||||||
color={gui='bold', bg='#141617'},
|
color = { gui = 'bold', bg = '#141617' },
|
||||||
sections = { 'error', 'warn', 'info', 'hint' },
|
sections = { 'error', 'warn', 'info', 'hint' },
|
||||||
symbols = { error = "✘ ", warn = " ", info = " ", hint = " " },
|
symbols = { error = "✘ ", warn = " ", info = " ", hint = " " },
|
||||||
update_in_insert = true
|
update_in_insert = true
|
||||||
|
@ -51,15 +51,15 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'diff',
|
'diff',
|
||||||
icon = {' ', color={bg='#141617', fg='#d8a657', gui='bold'}},
|
icon = { ' ', color = { bg = '#141617', fg = '#d8a657', gui = 'bold' } },
|
||||||
color={gui='bold', bg='#141617'},
|
color = { gui = 'bold', bg = '#141617' },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
lualine_z = {'location'}
|
lualine_z = { 'location' }
|
||||||
},
|
},
|
||||||
|
|
||||||
inactive_sections = {
|
inactive_sections = {
|
||||||
lualine_a = {'mode'},
|
lualine_a = { 'mode' },
|
||||||
lualine_b = {
|
lualine_b = {
|
||||||
{
|
{
|
||||||
'branch',
|
'branch',
|
||||||
|
@ -75,8 +75,8 @@ return {
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
{
|
{
|
||||||
'filetype',
|
'filetype',
|
||||||
color={gui='italic'},
|
color = { gui = 'italic' },
|
||||||
fmt = function (str)
|
fmt = function(str)
|
||||||
return (str:gsub("^%l", string.upper))
|
return (str:gsub("^%l", string.upper))
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ return {
|
||||||
lualine_y = {
|
lualine_y = {
|
||||||
{
|
{
|
||||||
'diagnostics',
|
'diagnostics',
|
||||||
color={gui='bold', bg='#141617'},
|
color = { gui = 'bold', bg = '#141617' },
|
||||||
sections = { 'error', 'warn', 'info', 'hint' },
|
sections = { 'error', 'warn', 'info', 'hint' },
|
||||||
symbols = { error = "✘ ", warn = " ", info = " ", hint = " " },
|
symbols = { error = "✘ ", warn = " ", info = " ", hint = " " },
|
||||||
update_in_insert = true
|
update_in_insert = true
|
||||||
|
@ -92,14 +92,13 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'diff',
|
'diff',
|
||||||
icon = {' ', color={bg='#141617', gui='bold'}},
|
icon = { ' ', color = { bg = '#141617', gui = 'bold' } },
|
||||||
color={gui='bold', bg='#141617'},
|
color = { gui = 'bold', bg = '#141617' },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
lualine_z = {'location'}
|
lualine_z = { 'location' }
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ return {
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope-ui-select.nvim",
|
"nvim-telescope/telescope-ui-select.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
config = function ()
|
config = function()
|
||||||
-- This is your opts table
|
-- This is your opts table
|
||||||
require("telescope").setup {
|
require("telescope").setup {
|
||||||
extensions = {
|
extensions = {
|
||||||
|
@ -39,7 +39,7 @@ return {
|
||||||
vim.keymap.set('n', '<space>fm', function() vim.lsp.buf.format { async = true } end, bufopts)
|
vim.keymap.set('n', '<space>fm', function() vim.lsp.buf.format { async = true } end, bufopts)
|
||||||
end,
|
end,
|
||||||
sources = {
|
sources = {
|
||||||
null_ls.builtins.diagnostics.trail_space.with{
|
null_ls.builtins.diagnostics.trail_space.with {
|
||||||
disabled_filetypes = { "lua" }
|
disabled_filetypes = { "lua" }
|
||||||
},
|
},
|
||||||
null_ls.builtins.diagnostics.shellcheck,
|
null_ls.builtins.diagnostics.shellcheck,
|
||||||
|
@ -51,4 +51,3 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,14 +8,14 @@ return {
|
||||||
"rafamadriz/friendly-snippets",
|
"rafamadriz/friendly-snippets",
|
||||||
config = function()
|
config = function()
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
vim.api.nvim_set_hl( 0, "PmenuSel", { fg = 'NONE', bg = '#141617' } )
|
vim.api.nvim_set_hl(0, "PmenuSel", { fg = 'NONE', bg = '#141617' })
|
||||||
vim.api.nvim_set_hl( 0, "Pmenu", { fg = 'NONE', bg = '#1d2021' } )
|
vim.api.nvim_set_hl(0, "Pmenu", { fg = 'NONE', bg = '#1d2021' })
|
||||||
vim.api.nvim_set_hl( 0, "CmpItemMenu", { fg = 'NONE', bg = '#141617' } )
|
vim.api.nvim_set_hl(0, "CmpItemMenu", { fg = 'NONE', bg = '#141617' })
|
||||||
vim.api.nvim_set_hl( 0, "CmpItemMenuDefault", { fg = 'NONE', bg = '#141617' } )
|
vim.api.nvim_set_hl(0, "CmpItemMenuDefault", { fg = 'NONE', bg = '#141617' })
|
||||||
vim.api.nvim_set_hl( 0, "CmpItemKindFunction", { fg = '#d3869b', bg = 'NONE', italic = true } )
|
vim.api.nvim_set_hl(0, "CmpItemKindFunction", { fg = '#d3869b', bg = 'NONE', italic = true })
|
||||||
vim.api.nvim_set_hl( 0, "CmpItemKindSnippet", { fg = '#d8a657', bg = 'NONE', italic = true } )
|
vim.api.nvim_set_hl(0, "CmpItemKindSnippet", { fg = '#d8a657', bg = 'NONE', italic = true })
|
||||||
vim.api.nvim_set_hl( 0, "CmpItemKindText", {fg = '#ddc7a1', bg = 'NONE', italic = true } )
|
vim.api.nvim_set_hl(0, "CmpItemKindText", { fg = '#ddc7a1', bg = 'NONE', italic = true })
|
||||||
vim.api.nvim_set_hl( 0, "CmpItemKindVariable", {fg = '#7daea3', bg = 'NONE', italic = true } )
|
vim.api.nvim_set_hl(0, "CmpItemKindVariable", { fg = '#7daea3', bg = 'NONE', italic = true })
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -69,13 +69,14 @@ return {
|
||||||
local has_words_before = function()
|
local has_words_before = function()
|
||||||
unpack = unpack or table.unpack
|
unpack = unpack or table.unpack
|
||||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
return col ~= 0 and
|
||||||
|
vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local luasnip = require("luasnip")
|
local luasnip = require("luasnip")
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
|
|
||||||
return{
|
return {
|
||||||
formatting = {
|
formatting = {
|
||||||
format = function(entry, vim_item)
|
format = function(entry, vim_item)
|
||||||
-- Kind icons
|
-- Kind icons
|
||||||
|
@ -96,7 +97,6 @@ return {
|
||||||
return vim_item
|
return vim_item
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
|
||||||
snippet = {
|
snippet = {
|
||||||
-- REQUIRED - you must specify a snippet engine
|
-- REQUIRED - you must specify a snippet engine
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
|
@ -106,7 +106,6 @@ return {
|
||||||
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- completion = {
|
-- completion = {
|
||||||
-- autocomplete = false,
|
-- autocomplete = false,
|
||||||
-- },
|
-- },
|
||||||
|
@ -115,9 +114,8 @@ return {
|
||||||
completion = cmp.config.window.bordered(),
|
completion = cmp.config.window.bordered(),
|
||||||
documentation = cmp.config.window.bordered(),
|
documentation = cmp.config.window.bordered(),
|
||||||
},
|
},
|
||||||
|
|
||||||
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(),
|
||||||
|
@ -146,8 +144,8 @@ return {
|
||||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_prev_item()
|
cmp.select_prev_item()
|
||||||
elseif luasnip.jumpable(-1) then
|
elseif luasnip.jumpable( -1) then
|
||||||
luasnip.jump(-1)
|
luasnip.jump( -1)
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
|
@ -162,7 +160,6 @@ return {
|
||||||
{ name = 'buffer' },
|
{ name = 'buffer' },
|
||||||
}, {
|
}, {
|
||||||
}),
|
}),
|
||||||
|
|
||||||
-- Set configuration for specific filetype.
|
-- Set configuration for specific filetype.
|
||||||
cmp.setup.filetype('gitcommit', {
|
cmp.setup.filetype('gitcommit', {
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
|
@ -171,7 +168,6 @@ return {
|
||||||
{ name = 'buffer' },
|
{ name = 'buffer' },
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
|
|
||||||
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
|
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
|
||||||
cmp.setup.cmdline({ '/', '?' }, {
|
cmp.setup.cmdline({ '/', '?' }, {
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
|
@ -179,7 +175,6 @@ return {
|
||||||
{ name = 'buffer' }
|
{ name = 'buffer' }
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||||
cmp.setup.cmdline(':', {
|
cmp.setup.cmdline(':', {
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
|
|
|
@ -13,7 +13,7 @@ return {
|
||||||
update_n_lines = "gzn",
|
update_n_lines = "gzn",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function (_, opts)
|
config = function(_, opts)
|
||||||
require("mini.surround").setup(opts)
|
require("mini.surround").setup(opts)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,11 +8,11 @@ return {
|
||||||
{ "<leader>:", "<cmd>Telescope command_history<cr>", desc = "Command History" },
|
{ "<leader>:", "<cmd>Telescope command_history<cr>", desc = "Command History" },
|
||||||
{ "<leader>,", "<cmd>Telescope buffers show_all_buffers=true<cr>", desc = "Switch Buffer" },
|
{ "<leader>,", "<cmd>Telescope buffers show_all_buffers=true<cr>", desc = "Switch Buffer" },
|
||||||
-- find
|
-- find
|
||||||
{"<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find Files" },
|
{ "<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find Files" },
|
||||||
{"<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Grep Content in Files" },
|
{ "<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Grep Content in Files" },
|
||||||
{"<leader>/", "<cmd>Telescope live_grep<cr>", desc = "Grep Content in Files" },
|
{ "<leader>/", "<cmd>Telescope live_grep<cr>", desc = "Grep Content in Files" },
|
||||||
{"<leader>fG", "<cmd>Telescope git_files<cr>", desc = "Find Git Files" },
|
{ "<leader>fG", "<cmd>Telescope git_files<cr>", desc = "Find Git Files" },
|
||||||
{"<leader>fk", "<cmd>Telescope keymaps<cr>", desc = "Find Git Files" },
|
{ "<leader>fk", "<cmd>Telescope keymaps<cr>", desc = "Find Git Files" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"folke/twilight.nvim",
|
"folke/twilight.nvim",
|
||||||
config = function ()
|
config = function()
|
||||||
require("twilight").setup {
|
require("twilight").setup {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue