4work
This commit is contained in:
+6
-3
@@ -13,8 +13,11 @@ autocmd("VimLeave", {
|
||||
command = "set guicursor=a:ver25-Cursor"
|
||||
})
|
||||
|
||||
autocmd({ "CursorHold" }, {
|
||||
autocmd("BufWritePre", {
|
||||
callback = function()
|
||||
vim.diagnostic.open_float(nil, { focus = false })
|
||||
end
|
||||
local ok = pcall(function()
|
||||
vim.cmd "undojoin"
|
||||
end)
|
||||
vim.cmd "Neoformat"
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
require("tiny-inline-diagnostic").setup({})
|
||||
@@ -0,0 +1,73 @@
|
||||
require("actions-preview").setup {
|
||||
-- options for vim.diff(): https://neovim.io/doc/user/lua.html#vim.diff()
|
||||
diff = {
|
||||
ctxlen = 3,
|
||||
},
|
||||
|
||||
highlight_command = {
|
||||
-- require("actions-preview.highlight").delta(),
|
||||
-- require("actions-preview.highlight").diff_so_fancy(),
|
||||
-- require("actions-preview.highlight").diff_highlight(),
|
||||
},
|
||||
|
||||
-- priority list of preferred backend
|
||||
backend = { "snacks", "nui" },
|
||||
|
||||
-- options related to telescope.nvim
|
||||
telescope = vim.tbl_extend(
|
||||
"force",
|
||||
require("telescope.themes").get_dropdown(),
|
||||
-- a table for customizing content
|
||||
{
|
||||
-- a function to make a table containing the values to be displayed.
|
||||
-- fun(action: Action): { title: string, client_name: string|nil }
|
||||
make_value = nil,
|
||||
|
||||
-- a function to make a function to be used in `display` of a entry.
|
||||
-- see also `:h telescope.make_entry` and `:h telescope.pickers.entry_display`.
|
||||
-- fun(values: { index: integer, action: Action, title: string, client_name: string }[]): function
|
||||
make_make_display = nil,
|
||||
}
|
||||
),
|
||||
|
||||
-- options for nui.nvim components
|
||||
nui = {
|
||||
-- component direction. "col" or "row"
|
||||
dir = "col",
|
||||
-- keymap for selection component: https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/menu#keymap
|
||||
keymap = nil,
|
||||
-- options for nui Layout component: https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/layout
|
||||
layout = {
|
||||
position = "50%",
|
||||
size = {
|
||||
width = "60%",
|
||||
height = "100%",
|
||||
},
|
||||
min_width = 40,
|
||||
min_height = 10,
|
||||
relative = "editor",
|
||||
},
|
||||
-- options for preview area: https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup
|
||||
preview = {
|
||||
size = "80%",
|
||||
border = {
|
||||
style = "rounded",
|
||||
padding = { 0, 1 },
|
||||
},
|
||||
},
|
||||
-- options for selection area: https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/menu
|
||||
select = {
|
||||
size = "20%",
|
||||
border = {
|
||||
style = "rounded",
|
||||
padding = { 0, 1 },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
--- options for snacks picker
|
||||
---@type snacks.picker.Config
|
||||
snacks = {
|
||||
layout = { rpreset = "default" },
|
||||
},
|
||||
}
|
||||
@@ -3,6 +3,8 @@ local map = vim.keymap.set
|
||||
map("n", "<Tab>", "<Cmd>BufferLineCycleNext<CR>")
|
||||
map("n", "<S-Tab>", "<Cmd>BufferLineCyclePrev<CR>")
|
||||
|
||||
map({"n", "v"}, "<leader>ap", require("actions-preview").code_actions)
|
||||
|
||||
map("n", ";", ":", { desc = "CMD enter command mode" })
|
||||
|
||||
-- Move selected text up
|
||||
|
||||
@@ -280,4 +280,22 @@ return {
|
||||
require("config.tmux")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"rachartier/tiny-inline-diagnostic.nvim",
|
||||
config = function ()
|
||||
require("config.TID")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"aznhe21/actions-preview.nvim",
|
||||
config = function()
|
||||
require("config.actions-preview")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"sbdchd/neoformat",
|
||||
-- config = function()
|
||||
-- require("config.neoformat")
|
||||
-- end,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user