cleanup, new surround plugin
This commit is contained in:
parent
b3afb86d29
commit
2280406860
9 changed files with 65 additions and 39 deletions
|
@ -64,9 +64,9 @@ M.list = {
|
||||||
pattern = { "qf", "help", "man", "lspinfo", "spectre_panel", "lir" },
|
pattern = { "qf", "help", "man", "lspinfo", "spectre_panel", "lir" },
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.cmd [[
|
vim.cmd [[
|
||||||
nnoremap <silent> <buffer> q :close<CR>
|
nnoremap <silent> <buffer> q :close<CR>
|
||||||
set nobuflisted
|
set nobuflisted
|
||||||
]]
|
]]
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -91,9 +91,7 @@ M.list = {
|
||||||
{ -- Fix auto comment
|
{ -- Fix auto comment
|
||||||
'BufWinEnter',
|
'BufWinEnter',
|
||||||
{
|
{
|
||||||
callback = function()
|
command = "set formatoptions-=cro"
|
||||||
vim.cmd("set formatoptions-=cro")
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ -- Highlight yanked text
|
{ -- Highlight yanked text
|
||||||
|
@ -106,8 +104,8 @@ M.list = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
M.setup = function()
|
function M.setup()
|
||||||
vim.api.nvim_create_augroup('packer_user_config', { clear = true })
|
vim.api.nvim_create_augroup('user_config', { clear = true })
|
||||||
for _, entry in ipairs(M.list) do
|
for _, entry in ipairs(M.list) do
|
||||||
local event = entry[1]
|
local event = entry[1]
|
||||||
local opts = entry[2]
|
local opts = entry[2]
|
||||||
|
|
|
@ -50,14 +50,18 @@ local maps = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local function start_lf()
|
||||||
|
require('lf').start()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local wkmaps = {
|
local wkmaps = {
|
||||||
general = {
|
general = {
|
||||||
n = {
|
n = {
|
||||||
["w"] = { "<cmd>w!<CR>", "Save" },
|
["w"] = { "<cmd>w!<CR>", "Save" },
|
||||||
["q"] = { function() require("funcs").buf_kill() end, "Close" },
|
["q"] = { function() require("funcs").buf_kill() end, "Close" },
|
||||||
["f"] = { function() require("lf").start("~") end, "File Picker" },
|
|
||||||
["h"] = { "<cmd>nohlsearch<CR>", "Clear Highlights" },
|
["h"] = { "<cmd>nohlsearch<CR>", "Clear Highlights" },
|
||||||
["e"] = { function() require('packer').loader("lf.nvim") require("lf").start() end, "File Picker" },
|
["e"] = { function() require('packer').loader("lf.nvim") start_lf() end, "File Picker" },
|
||||||
u = {
|
u = {
|
||||||
name = "Utility",
|
name = "Utility",
|
||||||
c = { "<cmd>w!<CR><cmd>!compiler \"%:p\"<CR>", "Compile" },
|
c = { "<cmd>w!<CR><cmd>!compiler \"%:p\"<CR>", "Compile" },
|
||||||
|
|
|
@ -37,7 +37,7 @@ o.modeline = true
|
||||||
o.modelines = 3
|
o.modelines = 3
|
||||||
o.listchars = "eol:$,tab:>-,trail:~,extends:>,precedes:<"
|
o.listchars = "eol:$,tab:>-,trail:~,extends:>,precedes:<"
|
||||||
|
|
||||||
g.Illuminate_ftblacklist = { 'alpha', 'NvimTree' }
|
g.Illuminate_ftblacklist = { 'alpha' }
|
||||||
g.mapleader = ' '
|
g.mapleader = ' '
|
||||||
|
|
||||||
local icons = require 'config.icons'.list
|
local icons = require 'config.icons'.list
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
require("lf").setup({
|
local status_ok, lf = pcall(require, 'lf')
|
||||||
default_actions = {},
|
if not status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
lf.setup({
|
||||||
|
mappings = false,
|
||||||
winblend = 0,
|
winblend = 0,
|
||||||
highlights = {
|
|
||||||
NormalFloat = { guibg = "NONE" }
|
|
||||||
},
|
|
||||||
border = "rounded",
|
border = "rounded",
|
||||||
})
|
})
|
||||||
|
|
|
@ -2,6 +2,7 @@ local status_ok, colorizer = pcall(require, 'colorizer')
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
colorizer.setup({ '*' }, {
|
colorizer.setup({ '*' }, {
|
||||||
RGB = true, -- #RGB hex codes
|
RGB = true, -- #RGB hex codes
|
||||||
RRGGBB = true, -- #RRGGBB hex codes
|
RRGGBB = true, -- #RRGGBB hex codes
|
||||||
|
|
19
.config/nvim/lua/plugins/config/nvim-surround.lua
Normal file
19
.config/nvim/lua/plugins/config/nvim-surround.lua
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
local status_ok, surround = pcall(require, 'nvim-surround')
|
||||||
|
if not status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
surround.setup({
|
||||||
|
-- keymaps = {
|
||||||
|
-- insert = "<C-g>s",
|
||||||
|
-- insert_line = "<C-g>S",
|
||||||
|
-- normal = "ys",
|
||||||
|
-- normal_cur = "yss",
|
||||||
|
-- normal_line = "yS",
|
||||||
|
-- normal_cur_line = "ySS",
|
||||||
|
-- visual = "S",
|
||||||
|
-- visual_line = "gS",
|
||||||
|
-- delete = "ds",
|
||||||
|
-- change = "cs",
|
||||||
|
-- },
|
||||||
|
})
|
|
@ -4,9 +4,9 @@ if not status_ok then
|
||||||
end
|
end
|
||||||
|
|
||||||
tokyonight.setup({
|
tokyonight.setup({
|
||||||
|
style = "night",
|
||||||
transparent = true,
|
transparent = true,
|
||||||
terminal_colors = true,
|
terminal_colors = true,
|
||||||
dim_inactive = true,
|
dim_inactive = true,
|
||||||
lualine_bold = true,
|
|
||||||
})
|
})
|
||||||
vim.cmd [[colorscheme tokyonight]]
|
vim.cmd [[colorscheme tokyonight]]
|
||||||
|
|
|
@ -4,17 +4,19 @@ if not status_ok then
|
||||||
end
|
end
|
||||||
local icons = require('config.icons').list
|
local icons = require('config.icons').list
|
||||||
|
|
||||||
whichkey.setup {
|
whichkey.setup({
|
||||||
marks = false,
|
plugins = {
|
||||||
registers = false,
|
marks = false,
|
||||||
presets = {
|
registers = false,
|
||||||
operators = false,
|
presets = {
|
||||||
motions = false,
|
operators = false,
|
||||||
text_objects = false,
|
motions = false,
|
||||||
windows = false,
|
text_objects = false,
|
||||||
nav = false,
|
windows = false,
|
||||||
z = false,
|
nav = false,
|
||||||
g = false,
|
z = false,
|
||||||
|
g = false,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
spelling = {
|
spelling = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
|
@ -46,6 +48,6 @@ whichkey.setup {
|
||||||
triggers = "auto",
|
triggers = "auto",
|
||||||
triggers_blacklist = {
|
triggers_blacklist = {
|
||||||
i = { "j", "k" },
|
i = { "j", "k" },
|
||||||
v = { "j", "k", "c", "y", "d", "v" },
|
v = { "j", "k", "y" },
|
||||||
},
|
},
|
||||||
}
|
})
|
||||||
|
|
|
@ -7,11 +7,10 @@ local plugins = {
|
||||||
},
|
},
|
||||||
{ "nvim-lua/plenary.nvim" },
|
{ "nvim-lua/plenary.nvim" },
|
||||||
{ "lewis6991/impatient.nvim" },
|
{ "lewis6991/impatient.nvim" },
|
||||||
{ "tpope/vim-surround",
|
{ "kylechui/nvim-surround",
|
||||||
event = { "BufRead", "BufWinEnter", "BufNewFile" },
|
config = function()
|
||||||
},
|
require('plugins.config.nvim-surround')
|
||||||
{ "tpope/vim-repeat",
|
end
|
||||||
event = { "BufRead", "BufWinEnter", "BufNewFile" },
|
|
||||||
},
|
},
|
||||||
{ "fladson/vim-kitty",
|
{ "fladson/vim-kitty",
|
||||||
ft = "kitty"
|
ft = "kitty"
|
||||||
|
@ -162,10 +161,10 @@ local plugins = {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ "saadparwaiz1/cmp_luasnip", after = "LuaSnip" },
|
{ "saadparwaiz1/cmp_luasnip", after = "LuaSnip" },
|
||||||
{ "hrsh7th/cmp-nvim-lua", after = "cmp_luasnip" },
|
{ "hrsh7th/cmp-nvim-lua", after = "cmp_luasnip" },
|
||||||
{ "hrsh7th/cmp-nvim-lsp", after = "cmp-nvim-lua" },
|
{ "hrsh7th/cmp-nvim-lsp", after = "cmp-nvim-lua" },
|
||||||
{ "hrsh7th/cmp-buffer", after = "cmp-nvim-lsp" },
|
{ "hrsh7th/cmp-buffer", after = "cmp-nvim-lsp" },
|
||||||
{ "hrsh7th/cmp-path", after = "cmp-buffer" },
|
{ "hrsh7th/cmp-path", after = "cmp-buffer" },
|
||||||
{ "onsails/lspkind.nvim" },
|
{ "onsails/lspkind.nvim" },
|
||||||
{ "windwp/nvim-autopairs",
|
{ "windwp/nvim-autopairs",
|
||||||
after = "nvim-cmp",
|
after = "nvim-cmp",
|
||||||
|
@ -203,6 +202,7 @@ local plugins = {
|
||||||
-- },
|
-- },
|
||||||
{ "lmburns/lf.nvim",
|
{ "lmburns/lf.nvim",
|
||||||
opt = true,
|
opt = true,
|
||||||
|
commit = "383429497292dd8a84271e74a81c6db6993ca7ab",
|
||||||
config = function()
|
config = function()
|
||||||
require('plugins.config.lf')
|
require('plugins.config.lf')
|
||||||
require('config.keymaps').map("lf")
|
require('config.keymaps').map("lf")
|
||||||
|
|
Loading…
Add table
Reference in a new issue