updated kakoune
This commit is contained in:
committed by
Michael Chalupiak
parent
9f23b8e92b
commit
00781ddcae
@@ -12,6 +12,7 @@ setnx('<leader>b', Snacks.picker.buffers, 'List buffers')
|
||||
setnx('<leader>h', Snacks.picker.help, 'Search help')
|
||||
setnx('<leader>P', '<CMD>Markview splitToggle<CR>', 'Open markview preview')
|
||||
setnx('<leader>z', Snacks.zen.zen, 'Toggle snacks zen mode')
|
||||
setnx('<leader>d', '<CMD>AnyJump<CR>', 'AnyJump jump to definition')
|
||||
|
||||
local setto = function(key, command, desc)
|
||||
set({ 'x', 'o' }, key, command, { desc = desc })
|
||||
|
||||
@@ -64,25 +64,8 @@ vim.g.netrw_keepdir = 0
|
||||
vim.g.netrw_preview = 1
|
||||
vim.g.netrw_alto = 0
|
||||
|
||||
vim.opt.exrc = true
|
||||
|
||||
vim.ui.select = Snacks.picker.select
|
||||
|
||||
-- vim.cmd('colorscheme carbonfox')
|
||||
|
||||
vim.lsp.config('lua_ls', {
|
||||
settings = {
|
||||
Lua = {
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
maxPreload = 100000,
|
||||
preloadFileSize = 100000,
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
vim.lsp.config('tinymist', {
|
||||
settings = {
|
||||
exportPdf = "onType",
|
||||
}
|
||||
})
|
||||
vim.diagnostic.config({ update_in_insert = true, float = true, virtual_lines = true})
|
||||
|
||||
@@ -151,11 +151,11 @@ return {
|
||||
-- refer to the configuration section below
|
||||
set_dark_mode = function()
|
||||
vim.api.nvim_set_option_value("background", "dark", {})
|
||||
vim.cmd('colorscheme carbonfox')
|
||||
vim.cmd('colorscheme rose-pine-main')
|
||||
end,
|
||||
set_light_mode = function()
|
||||
vim.api.nvim_set_option_value("background", "light", {})
|
||||
vim.cmd('colorscheme dawnfox')
|
||||
vim.cmd('colorscheme rose-pine-dawn')
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -34,22 +34,22 @@ return {
|
||||
ft = 'puml',
|
||||
},
|
||||
|
||||
{
|
||||
"S1M0N38/love2d.nvim",
|
||||
-- event = "VeryLazy",
|
||||
ft = 'lua',
|
||||
version = "2.*",
|
||||
opts = { },
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-neorg/neorg",
|
||||
-- lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default
|
||||
ft = 'norg',
|
||||
version = "*", -- Pin Neorg to the latest stable release
|
||||
config = true,
|
||||
},
|
||||
|
||||
-- {
|
||||
-- "S1M0N38/love2d.nvim",
|
||||
-- -- event = "VeryLazy",
|
||||
-- ft = 'lua',
|
||||
-- version = "2.*",
|
||||
-- opts = { },
|
||||
-- },
|
||||
--
|
||||
-- {
|
||||
-- "nvim-neorg/neorg",
|
||||
-- -- lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default
|
||||
-- ft = 'norg',
|
||||
-- version = "*", -- Pin Neorg to the latest stable release
|
||||
-- config = true,
|
||||
-- },
|
||||
--
|
||||
-- {
|
||||
-- "Olical/conjure"
|
||||
-- },
|
||||
|
||||
@@ -12,6 +12,13 @@ return {
|
||||
-- this is equivalent to setup({}) function
|
||||
},
|
||||
|
||||
{
|
||||
'pechorin/any-jump.vim',
|
||||
config = function()
|
||||
vim.g.any_jump_search_prefered_engine = 'ag'
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"NeogitOrg/neogit",
|
||||
lazy = true,
|
||||
@@ -66,6 +73,19 @@ return {
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
main = "ibl",
|
||||
---@module "ibl"
|
||||
---@type ibl.config
|
||||
opts = {
|
||||
scope = {
|
||||
show_start = false,
|
||||
show_end = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
@@ -105,7 +125,7 @@ return {
|
||||
image = {
|
||||
enabled = true
|
||||
},
|
||||
indent = { enabled = true },
|
||||
indent = { enabled = false },
|
||||
input = { enabled = true },
|
||||
lazygit = { enabled = false },
|
||||
picker = {
|
||||
@@ -177,6 +197,10 @@ return {
|
||||
---@module 'oil'
|
||||
---@type oil.SetupOpts
|
||||
opts = {
|
||||
win_options = {
|
||||
winbar = "%#@attribute.builtin#%{substitute(v:lua.require('oil').get_current_dir(), '^' . $HOME, '~', '')}",
|
||||
},
|
||||
|
||||
triggers = {
|
||||
{ 'g', mode = { 'n', 'x' } },
|
||||
},
|
||||
@@ -238,98 +262,98 @@ return {
|
||||
event = 'VeryLazy',
|
||||
},
|
||||
|
||||
{
|
||||
"jake-stewart/multicursor.nvim",
|
||||
branch = "1.0",
|
||||
config = function()
|
||||
local mc = require("multicursor-nvim")
|
||||
mc.setup()
|
||||
|
||||
local set = vim.keymap.set
|
||||
|
||||
-- Add or skip cursor above/below the main cursor.
|
||||
set({"n", "x"}, "<localleader>k", function() mc.lineAddCursor(-1) end, { desc = "Add cursor to previous line" })
|
||||
set({"n", "x"}, "<localleader>j", function() mc.lineAddCursor(1) end, { desc = "Add cursor to next line" })
|
||||
set({"n", "x"}, "<up>", function() mc.lineAddCursor(-1) end, { desc = "Add cursor to previous line" })
|
||||
set({"n", "x"}, "<down>", function() mc.lineAddCursor(1) end, { desc = "Add cursor to next line" })
|
||||
set({"n", "x"}, "<localleader>K", function() mc.lineSkipCursor(-1) end, { desc = "Skip previous line to add cursor" })
|
||||
set({"n", "x"}, "<localleader>J", function() mc.lineSkipCursor(1) end, { desc = "Skip next line to add cursor" })
|
||||
|
||||
-- Add or skip adding a new cursor by matching word/selection
|
||||
set({"n", "x"}, "<localleader>n", function() mc.matchAddCursor(1) end, { desc = "Add cursor to next currently selected word" })
|
||||
set({"n", "x"}, "<localleader>s", function() mc.matchSkipCursor(1) end, { desc = "Skip next instance of current word to add cursor" })
|
||||
set({"n", "x"}, "<localleader>N", function() mc.matchAddCursor(-1) end, { desc = "Add cursor to previous currently selected word" })
|
||||
set({"n", "x"}, "<localleader>S", function() mc.matchSkipCursor(-1) end, { desc = "Skip previous instance of current word to add cursor" })
|
||||
|
||||
set({"n", "x"}, "<localleader>m", mc.operator, { desc = "Add cursors to text object" })
|
||||
set("n", "<localleader>s", function()
|
||||
vim.ui.input({prompt = "Match: "}, function(input) mc.operator({pattern = input}) end)
|
||||
end, { desc = "Add cursors to regex match inside text object " })
|
||||
set("n", "<localleader>*", function()
|
||||
mc.operator({pattern = vim.fn.expand("<cword>")})
|
||||
end, { desc = "Add cursors to current word inside text object" })
|
||||
set("x", "<localleader>s", mc.matchCursors, { desc = "Add cursors to regex match inside visual selection" })
|
||||
|
||||
-- Add cursor at next argument treesitter
|
||||
set({'n', 'x'}, ']A', function()
|
||||
if vim.v.count < 1 then
|
||||
mc.addCursor(']p')
|
||||
else
|
||||
for _=1, vim.v.count - 1 do
|
||||
mc.addCursor(']p')
|
||||
end
|
||||
end
|
||||
end, { desc = 'Create multicursor on next argument'})
|
||||
set({'n', 'x'}, '[A', function()
|
||||
if vim.v.count < 1 then
|
||||
mc.addCursor('[p')
|
||||
else
|
||||
for _=1, vim.v.count - 1 do
|
||||
mc.addCursor('[p')
|
||||
end
|
||||
end
|
||||
end, { desc = 'Create multicursor on previous argument'})
|
||||
|
||||
-- Add and remove cursors with control + left click.
|
||||
set("n", "<c-leftmouse>", mc.handleMouse)
|
||||
set("n", "<c-leftdrag>", mc.handleMouseDrag)
|
||||
set("n", "<c-leftrelease>", mc.handleMouseRelease)
|
||||
|
||||
-- Disable and enable cursors.
|
||||
set({"n", "x"}, "<c-q>", mc.toggleCursor, { desc = "Toggle multiple cursors" })
|
||||
|
||||
-- Mappings defined in a keymap layer only apply when there are
|
||||
-- multiple cursors. This lets you have overlapping mappings.
|
||||
mc.addKeymapLayer(function(layerSet)
|
||||
|
||||
-- Select a different cursor as the main one.
|
||||
layerSet({"n", "x"}, "<localleader>h", mc.prevCursor, { desc = "Make previous cursor primary" })
|
||||
layerSet({"n", "x"}, "<localleader>l", mc.nextCursor, { desc = "Make next cursor primary" })
|
||||
layerSet({"n", "x"}, "<left>", mc.prevCursor, { desc = "Make previous cursor primary" })
|
||||
layerSet({"n", "x"}, "<right>", mc.nextCursor, { desc = "Make next cursor primary" })
|
||||
|
||||
-- Delete the main cursor.
|
||||
layerSet({"n", "x"}, "<localleader>x", mc.deleteCursor)
|
||||
|
||||
-- Enable and clear cursors using escape.
|
||||
layerSet("n", "<esc>", function()
|
||||
if not mc.cursorsEnabled() then
|
||||
mc.enableCursors()
|
||||
else
|
||||
mc.clearCursors()
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
-- Customize how cursors look.
|
||||
local hl = vim.api.nvim_set_hl
|
||||
hl(0, "MultiCursorCursor", { reverse = true })
|
||||
hl(0, "MultiCursorVisual", { link = "Visual" })
|
||||
hl(0, "MultiCursorSign", { link = "SignColumn"})
|
||||
hl(0, "MultiCursorMatchPreview", { link = "Search" })
|
||||
hl(0, "MultiCursorDisabledCursor", { reverse = true })
|
||||
hl(0, "MultiCursorDisabledVisual", { link = "Visual" })
|
||||
hl(0, "MultiCursorDisabledSign", { link = "SignColumn"})
|
||||
end
|
||||
},
|
||||
-- {
|
||||
-- "jake-stewart/multicursor.nvim",
|
||||
-- branch = "1.0",
|
||||
-- config = function()
|
||||
-- local mc = require("multicursor-nvim")
|
||||
-- mc.setup()
|
||||
--
|
||||
-- local set = vim.keymap.set
|
||||
--
|
||||
-- -- Add or skip cursor above/below the main cursor.
|
||||
-- set({"n", "x"}, "<localleader>k", function() mc.lineAddCursor(-1) end, { desc = "Add cursor to previous line" })
|
||||
-- set({"n", "x"}, "<localleader>j", function() mc.lineAddCursor(1) end, { desc = "Add cursor to next line" })
|
||||
-- set({"n", "x"}, "<up>", function() mc.lineAddCursor(-1) end, { desc = "Add cursor to previous line" })
|
||||
-- set({"n", "x"}, "<down>", function() mc.lineAddCursor(1) end, { desc = "Add cursor to next line" })
|
||||
-- set({"n", "x"}, "<localleader>K", function() mc.lineSkipCursor(-1) end, { desc = "Skip previous line to add cursor" })
|
||||
-- set({"n", "x"}, "<localleader>J", function() mc.lineSkipCursor(1) end, { desc = "Skip next line to add cursor" })
|
||||
--
|
||||
-- -- Add or skip adding a new cursor by matching word/selection
|
||||
-- set({"n", "x"}, "<localleader>n", function() mc.matchAddCursor(1) end, { desc = "Add cursor to next currently selected word" })
|
||||
-- set({"n", "x"}, "<localleader>s", function() mc.matchSkipCursor(1) end, { desc = "Skip next instance of current word to add cursor" })
|
||||
-- set({"n", "x"}, "<localleader>N", function() mc.matchAddCursor(-1) end, { desc = "Add cursor to previous currently selected word" })
|
||||
-- set({"n", "x"}, "<localleader>S", function() mc.matchSkipCursor(-1) end, { desc = "Skip previous instance of current word to add cursor" })
|
||||
--
|
||||
-- set({"n", "x"}, "<localleader>m", mc.operator, { desc = "Add cursors to text object" })
|
||||
-- set("n", "<localleader>s", function()
|
||||
-- vim.ui.input({prompt = "Match: "}, function(input) mc.operator({pattern = input}) end)
|
||||
-- end, { desc = "Add cursors to regex match inside text object " })
|
||||
-- set("n", "<localleader>*", function()
|
||||
-- mc.operator({pattern = vim.fn.expand("<cword>")})
|
||||
-- end, { desc = "Add cursors to current word inside text object" })
|
||||
-- set("x", "<localleader>s", mc.matchCursors, { desc = "Add cursors to regex match inside visual selection" })
|
||||
--
|
||||
-- -- Add cursor at next argument treesitter
|
||||
-- set({'n', 'x'}, ']A', function()
|
||||
-- if vim.v.count < 1 then
|
||||
-- mc.addCursor(']p')
|
||||
-- else
|
||||
-- for _=1, vim.v.count - 1 do
|
||||
-- mc.addCursor(']p')
|
||||
-- end
|
||||
-- end
|
||||
-- end, { desc = 'Create multicursor on next argument'})
|
||||
-- set({'n', 'x'}, '[A', function()
|
||||
-- if vim.v.count < 1 then
|
||||
-- mc.addCursor('[p')
|
||||
-- else
|
||||
-- for _=1, vim.v.count - 1 do
|
||||
-- mc.addCursor('[p')
|
||||
-- end
|
||||
-- end
|
||||
-- end, { desc = 'Create multicursor on previous argument'})
|
||||
--
|
||||
-- -- Add and remove cursors with control + left click.
|
||||
-- set("n", "<c-leftmouse>", mc.handleMouse)
|
||||
-- set("n", "<c-leftdrag>", mc.handleMouseDrag)
|
||||
-- set("n", "<c-leftrelease>", mc.handleMouseRelease)
|
||||
--
|
||||
-- -- Disable and enable cursors.
|
||||
-- set({"n", "x"}, "<c-q>", mc.toggleCursor, { desc = "Toggle multiple cursors" })
|
||||
--
|
||||
-- -- Mappings defined in a keymap layer only apply when there are
|
||||
-- -- multiple cursors. This lets you have overlapping mappings.
|
||||
-- mc.addKeymapLayer(function(layerSet)
|
||||
--
|
||||
-- -- Select a different cursor as the main one.
|
||||
-- layerSet({"n", "x"}, "<localleader>h", mc.prevCursor, { desc = "Make previous cursor primary" })
|
||||
-- layerSet({"n", "x"}, "<localleader>l", mc.nextCursor, { desc = "Make next cursor primary" })
|
||||
-- layerSet({"n", "x"}, "<left>", mc.prevCursor, { desc = "Make previous cursor primary" })
|
||||
-- layerSet({"n", "x"}, "<right>", mc.nextCursor, { desc = "Make next cursor primary" })
|
||||
--
|
||||
-- -- Delete the main cursor.
|
||||
-- layerSet({"n", "x"}, "<localleader>x", mc.deleteCursor)
|
||||
--
|
||||
-- -- Enable and clear cursors using escape.
|
||||
-- layerSet("n", "<esc>", function()
|
||||
-- if not mc.cursorsEnabled() then
|
||||
-- mc.enableCursors()
|
||||
-- else
|
||||
-- mc.clearCursors()
|
||||
-- end
|
||||
-- end)
|
||||
-- end)
|
||||
--
|
||||
-- -- Customize how cursors look.
|
||||
-- local hl = vim.api.nvim_set_hl
|
||||
-- hl(0, "MultiCursorCursor", { reverse = true })
|
||||
-- hl(0, "MultiCursorVisual", { link = "Visual" })
|
||||
-- hl(0, "MultiCursorSign", { link = "SignColumn"})
|
||||
-- hl(0, "MultiCursorMatchPreview", { link = "Search" })
|
||||
-- hl(0, "MultiCursorDisabledCursor", { reverse = true })
|
||||
-- hl(0, "MultiCursorDisabledVisual", { link = "Visual" })
|
||||
-- hl(0, "MultiCursorDisabledSign", { link = "SignColumn"})
|
||||
-- end
|
||||
-- },
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user