1
0
Fork 0

cleanup, new surround plugin

This commit is contained in:
Luca Bilke 2023-02-23 19:43:22 +01:00
parent b3afb86d29
commit 2280406860
9 changed files with 65 additions and 39 deletions

View File

@ -64,9 +64,9 @@ M.list = {
pattern = { "qf", "help", "man", "lspinfo", "spectre_panel", "lir" },
callback = function()
vim.cmd [[
nnoremap <silent> <buffer> q :close<CR>
set nobuflisted
]]
nnoremap <silent> <buffer> q :close<CR>
set nobuflisted
]]
end
}
},
@ -91,9 +91,7 @@ M.list = {
{ -- Fix auto comment
'BufWinEnter',
{
callback = function()
vim.cmd("set formatoptions-=cro")
end
command = "set formatoptions-=cro"
}
},
{ -- Highlight yanked text
@ -106,8 +104,8 @@ M.list = {
}
}
M.setup = function()
vim.api.nvim_create_augroup('packer_user_config', { clear = true })
function M.setup()
vim.api.nvim_create_augroup('user_config', { clear = true })
for _, entry in ipairs(M.list) do
local event = entry[1]
local opts = entry[2]

View File

@ -50,14 +50,18 @@ local maps = {
}
}
local function start_lf()
require('lf').start()
end
local wkmaps = {
general = {
n = {
["w"] = { "<cmd>w!<CR>", "Save" },
["q"] = { function() require("funcs").buf_kill() end, "Close" },
["f"] = { function() require("lf").start("~") end, "File Picker" },
["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 = {
name = "Utility",
c = { "<cmd>w!<CR><cmd>!compiler \"%:p\"<CR>", "Compile" },

View File

@ -37,7 +37,7 @@ o.modeline = true
o.modelines = 3
o.listchars = "eol:$,tab:>-,trail:~,extends:>,precedes:<"
g.Illuminate_ftblacklist = { 'alpha', 'NvimTree' }
g.Illuminate_ftblacklist = { 'alpha' }
g.mapleader = ' '
local icons = require 'config.icons'.list

View File

@ -1,8 +1,10 @@
require("lf").setup({
default_actions = {},
local status_ok, lf = pcall(require, 'lf')
if not status_ok then
return
end
lf.setup({
mappings = false,
winblend = 0,
highlights = {
NormalFloat = { guibg = "NONE" }
},
border = "rounded",
})

View File

@ -2,6 +2,7 @@ local status_ok, colorizer = pcall(require, 'colorizer')
if not status_ok then
return
end
colorizer.setup({ '*' }, {
RGB = true, -- #RGB hex codes
RRGGBB = true, -- #RRGGBB hex codes

View 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",
-- },
})

View File

@ -4,9 +4,9 @@ if not status_ok then
end
tokyonight.setup({
style = "night",
transparent = true,
terminal_colors = true,
dim_inactive = true,
lualine_bold = true,
})
vim.cmd [[colorscheme tokyonight]]

View File

@ -4,17 +4,19 @@ if not status_ok then
end
local icons = require('config.icons').list
whichkey.setup {
marks = false,
registers = false,
presets = {
operators = false,
motions = false,
text_objects = false,
windows = false,
nav = false,
z = false,
g = false,
whichkey.setup({
plugins = {
marks = false,
registers = false,
presets = {
operators = false,
motions = false,
text_objects = false,
windows = false,
nav = false,
z = false,
g = false,
}
},
spelling = {
enabled = false,
@ -46,6 +48,6 @@ whichkey.setup {
triggers = "auto",
triggers_blacklist = {
i = { "j", "k" },
v = { "j", "k", "c", "y", "d", "v" },
v = { "j", "k", "y" },
},
}
})

View File

@ -7,11 +7,10 @@ local plugins = {
},
{ "nvim-lua/plenary.nvim" },
{ "lewis6991/impatient.nvim" },
{ "tpope/vim-surround",
event = { "BufRead", "BufWinEnter", "BufNewFile" },
},
{ "tpope/vim-repeat",
event = { "BufRead", "BufWinEnter", "BufNewFile" },
{ "kylechui/nvim-surround",
config = function()
require('plugins.config.nvim-surround')
end
},
{ "fladson/vim-kitty",
ft = "kitty"
@ -162,10 +161,10 @@ local plugins = {
end,
},
{ "saadparwaiz1/cmp_luasnip", after = "LuaSnip" },
{ "hrsh7th/cmp-nvim-lua", after = "cmp_luasnip" },
{ "hrsh7th/cmp-nvim-lsp", after = "cmp-nvim-lua" },
{ "hrsh7th/cmp-buffer", after = "cmp-nvim-lsp" },
{ "hrsh7th/cmp-path", after = "cmp-buffer" },
{ "hrsh7th/cmp-nvim-lua", after = "cmp_luasnip" },
{ "hrsh7th/cmp-nvim-lsp", after = "cmp-nvim-lua" },
{ "hrsh7th/cmp-buffer", after = "cmp-nvim-lsp" },
{ "hrsh7th/cmp-path", after = "cmp-buffer" },
{ "onsails/lspkind.nvim" },
{ "windwp/nvim-autopairs",
after = "nvim-cmp",
@ -203,6 +202,7 @@ local plugins = {
-- },
{ "lmburns/lf.nvim",
opt = true,
commit = "383429497292dd8a84271e74a81c6db6993ca7ab",
config = function()
require('plugins.config.lf')
require('config.keymaps').map("lf")