First commit: migration to new config
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
return {}
|
||||
-- return {
|
||||
-- indentLine_enabled = 1,
|
||||
-- filetype_exclude = {
|
||||
-- "help",
|
||||
-- "terminal",
|
||||
-- "lazy",
|
||||
-- "lspinfo",
|
||||
-- "TelescopePrompt",
|
||||
-- "TelescopeResults",
|
||||
-- "mason",
|
||||
-- "nvdash",
|
||||
-- "nvcheatsheet",
|
||||
-- "",
|
||||
-- },
|
||||
-- buftype_exclude = { "terminal" },
|
||||
-- show_trailing_blankline_indent = false,;
|
||||
-- show_first_indent_level = false,
|
||||
-- show_current_context = true,
|
||||
-- show_current_context_start = true,
|
||||
-- }
|
||||
@@ -0,0 +1,15 @@
|
||||
local options = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
-- css = { "prettier" },
|
||||
-- html = { "prettier" },
|
||||
},
|
||||
|
||||
format_on_save = {
|
||||
-- These options will be passed to conform.format()
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = true,
|
||||
},
|
||||
}
|
||||
|
||||
return options
|
||||
@@ -0,0 +1 @@
|
||||
return {}
|
||||
@@ -0,0 +1,138 @@
|
||||
local M = {
|
||||
port = nil, -- The port of the Go server, which runs in the background, if omitted or `nil` the port will be chosen automatically
|
||||
log_path = vim.fn.stdpath "cache" .. "/gitlab.nvim.log", -- Log path for the Go server
|
||||
config_path = nil, -- Custom path for `.gitlab.nvim` file, please read the "Connecting to Gitlab" section
|
||||
debug = {
|
||||
go_request = false,
|
||||
go_response = false,
|
||||
},
|
||||
attachment_dir = nil, -- The local directory for files (see the "summary" section)
|
||||
reviewer_settings = {
|
||||
diffview = {
|
||||
imply_local = false, -- If true, will attempt to use --imply_local option when calling |:DiffviewOpen|
|
||||
},
|
||||
},
|
||||
connection_settings = {
|
||||
insecure = false, -- Like curl's --insecure option, ignore bad x509 certificates on connection
|
||||
},
|
||||
help = "g?", -- Opens a help popup for local keymaps when a relevant view is focused (popup, discussion panel, etc)
|
||||
popup = { -- The popup for comment creation, editing, and replying
|
||||
keymaps = {
|
||||
next_field = "<Tab>", -- Cycle to the next field. Accepts count.
|
||||
prev_field = "<S-Tab>", -- Cycle to the previous field. Accepts count.
|
||||
},
|
||||
perform_action = "<leader>s", -- Once in normal mode, does action (like saving comment or editing description, etc)
|
||||
perform_linewise_action = "<leader>l", -- Once in normal mode, does the linewise action (see logs for this job, etc)
|
||||
width = "50%",
|
||||
height = "80%",
|
||||
border = "rounded", -- One of "
|
||||
opacity = 1.0, -- From 0.0 (fully transparent) to 1.0 (fully opaque)
|
||||
comment = nil, -- Individual popup overrides, e.g. { width = "60%", height = "80%", border = "single", opacity = 0.85 },
|
||||
edit = nil,
|
||||
note = nil,
|
||||
pipeline = nil,
|
||||
reply = nil,
|
||||
squash_message = nil,
|
||||
temp_registers = {}, -- List of registers for backing up popup content (see `:h gitlab.nvim.temp-registers`)
|
||||
},
|
||||
discussion_tree = { -- The discussion tree that holds all comments
|
||||
auto_open = true, -- Automatically open when the reviewer is opened
|
||||
switch_view = "S", -- Toggles between the notes and discussions views
|
||||
default_view = "discussions", -- Show "discussions" or "notes" by default
|
||||
blacklist = {}, -- List of usernames to remove from tree (bots, CI, etc)
|
||||
jump_to_file = "o", -- Jump to comment location in file
|
||||
jump_to_reviewer = "m", -- Jump to the location in the reviewer window
|
||||
edit_comment = "e", -- Edit comment
|
||||
delete_comment = "dd", -- Delete comment
|
||||
reply = "r", -- Reply to comment
|
||||
toggle_node = "t", -- Opens or closes the discussion
|
||||
add_emoji = "Ea", -- Add an emoji to the note/comment
|
||||
-- add_emoji = "Ed", -- Remove an emoji from a note/comment
|
||||
toggle_all_discussions = "T", -- Open or close separately both resolved and unresolved discussions
|
||||
toggle_resolved_discussions = "R", -- Open or close all resolved discussions
|
||||
toggle_unresolved_discussions = "U", -- Open or close all unresolved discussions
|
||||
keep_current_open = false, -- If true, current discussion stays open even if it should otherwise be closed when toggling
|
||||
publish_draft = "P", -- Publishes the currently focused note/comment
|
||||
toggle_resolved = "p", -- Toggles the resolved status of the whole discussion
|
||||
position = "left", -- "top", "right", "bottom" or "left"
|
||||
open_in_browser = "b", -- Jump to the URL of the current note/discussion
|
||||
copy_node_url = "u", -- Copy the URL of the current node to clipboard
|
||||
size = "30%", -- Size of split
|
||||
relative = "editor", -- Position of tree split relative to "editor" or "window"
|
||||
resolved = "✓", -- Symbol to show next to resolved discussions
|
||||
unresolved = "✗", -- Symbol to show next to unresolved discussions
|
||||
tree_type = "by_file_name", -- Type of discussion tree - "simple" means just list of discussions, "by_file_name" means file tree with discussions under file
|
||||
toggle_tree_type = "i", -- Toggle type of discussion tree - "simple", or "by_file_name"
|
||||
draft_mode = false, -- Whether comments are posted as drafts as part of a review
|
||||
toggle_draft_mode = "D", -- Toggle between draft mode (comments posted as drafts) and live mode (comments are posted immediately)
|
||||
winbar = nil, -- Custom function to return winbar title, should return a string. Provided with WinbarTable (defined in annotations.lua)
|
||||
-- If using lualine, please add "gitlab" to disabled file types, otherwise you will not see the winbar.
|
||||
},
|
||||
choose_merge_request = {
|
||||
open_reviewer = true, -- Open the reviewer window automatically after switching merge requests
|
||||
},
|
||||
info = { -- Show additional fields in the summary view
|
||||
enabled = true,
|
||||
horizontal = false, -- Display metadata to the left of the summary rather than underneath
|
||||
fields = { -- The fields listed here will be displayed, in whatever order you choose
|
||||
"author",
|
||||
"created_at",
|
||||
"updated_at",
|
||||
"merge_status",
|
||||
"draft",
|
||||
"conflicts",
|
||||
"assignees",
|
||||
"reviewers",
|
||||
"pipeline",
|
||||
"branch",
|
||||
"target_branch",
|
||||
"delete_branch",
|
||||
"squash",
|
||||
"labels",
|
||||
},
|
||||
},
|
||||
discussion_signs = {
|
||||
enabled = true, -- Show diagnostics for gitlab comments in the reviewer
|
||||
skip_resolved_discussion = false, -- Show diagnostics for resolved discussions
|
||||
severity = vim.diagnostic.severity.INFO, -- ERROR, WARN, INFO, or HINT
|
||||
virtual_text = false, -- Whether to show the comment text inline as floating virtual text
|
||||
priority = 100, -- Higher will override LSP warnings, etc
|
||||
icons = {
|
||||
comment = "→|",
|
||||
range = " |",
|
||||
},
|
||||
},
|
||||
pipeline = {
|
||||
created = "",
|
||||
pending = "",
|
||||
preparing = "",
|
||||
scheduled = "",
|
||||
running = "",
|
||||
canceled = "↪",
|
||||
skipped = "↪",
|
||||
success = "✓",
|
||||
failed = "",
|
||||
},
|
||||
create_mr = {
|
||||
target = "master", -- Default branch to target when creating an MR
|
||||
template_file = nil, -- Default MR template in .gitlab/merge_request_templates
|
||||
delete_branch = false, -- Whether the source branch will be marked for deletion
|
||||
squash = false, -- Whether the commits will be marked for squashing
|
||||
title_input = { -- Default settings for MR title input window
|
||||
width = 40,
|
||||
border = "rounded",
|
||||
},
|
||||
},
|
||||
colors = {
|
||||
discussion_tree = {
|
||||
username = "Keyword",
|
||||
date = "Comment",
|
||||
chevron = "DiffviewNonText",
|
||||
directory = "Directory",
|
||||
directory_icon = "DiffviewFolderSign",
|
||||
file_name = "Normal",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
||||
@@ -0,0 +1,10 @@
|
||||
return {
|
||||
signs = {
|
||||
add = { text = "│" },
|
||||
change = { text = "│" },
|
||||
delete = { text = "" },
|
||||
topdelete = { text = "‾" },
|
||||
changedelete = { text = "~" },
|
||||
untracked = { text = "│" },
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
local Hydra = require "hydra"
|
||||
|
||||
Hydra {
|
||||
name = "Change / Resize Window",
|
||||
mode = { "n" },
|
||||
body = "<leader>t",
|
||||
config = {
|
||||
-- color = "pink",
|
||||
},
|
||||
heads = {
|
||||
-- move between windows
|
||||
{ "<C-h>", "<C-w>h", { desc = "Noot nooty" } },
|
||||
{ "<C-j>", "<C-w>j" },
|
||||
{ "<C-k>", "<C-w>k" },
|
||||
{ "<C-l>", "<C-w>l" },
|
||||
|
||||
-- resizing window
|
||||
{ "H", "<C-w>3<" },
|
||||
{ "L", "<C-w>3>" },
|
||||
{ "K", "<C-w>2+" },
|
||||
{ "J", "<C-w>2-" },
|
||||
|
||||
-- equalize window sizes
|
||||
{ "e", "<C-w>=" },
|
||||
|
||||
-- close active window
|
||||
{ "Q", ":q<cr>" },
|
||||
{ "<C-q>", ":q<cr>" },
|
||||
|
||||
-- exit this Hydra
|
||||
{ "q", nil, { exit = true, nowait = true } },
|
||||
{ ";", nil, { exit = true, nowait = true } },
|
||||
{ "<Esc>", nil, { exit = true, nowait = true } },
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
return {
|
||||
defaults = { lazy = true },
|
||||
install = { colorscheme = { "nvchad" } },
|
||||
|
||||
ui = {
|
||||
icons = {
|
||||
ft = "",
|
||||
lazy = " ",
|
||||
loaded = "",
|
||||
not_loaded = "",
|
||||
},
|
||||
},
|
||||
|
||||
performance = {
|
||||
rtp = {
|
||||
disabled_plugins = {
|
||||
"2html_plugin",
|
||||
"tohtml",
|
||||
"getscript",
|
||||
"getscriptPlugin",
|
||||
"gzip",
|
||||
"logipat",
|
||||
"netrw",
|
||||
"netrwPlugin",
|
||||
"netrwSettings",
|
||||
"netrwFileHandlers",
|
||||
"matchit",
|
||||
"tar",
|
||||
"tarPlugin",
|
||||
"rrhelper",
|
||||
"spellfile_plugin",
|
||||
"vimball",
|
||||
"vimballPlugin",
|
||||
"zip",
|
||||
"zipPlugin",
|
||||
"tutor",
|
||||
"rplugin",
|
||||
"syntax",
|
||||
"synmenu",
|
||||
"optwin",
|
||||
"compiler",
|
||||
"bugreport",
|
||||
"ftplugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
-- load defaults i.e lua_lsp
|
||||
require("nvchad.configs.lspconfig").defaults()
|
||||
|
||||
local lspconfig = require "lspconfig"
|
||||
|
||||
-- EXAMPLE
|
||||
local servers = { "html", "cssls" }
|
||||
local nvlsp = require "nvchad.configs.lspconfig"
|
||||
|
||||
-- lsps with default config
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup {
|
||||
on_attach = nvlsp.on_attach,
|
||||
on_init = nvlsp.on_init,
|
||||
capabilities = nvlsp.capabilities,
|
||||
}
|
||||
end
|
||||
|
||||
-- configuring single server, example: typescript
|
||||
-- lspconfig.tsserver.setup {
|
||||
-- on_attach = nvlsp.on_attach,
|
||||
-- on_init = nvlsp.on_init,
|
||||
-- capabilities = nvlsp.capabilities,
|
||||
-- }
|
||||
@@ -0,0 +1,28 @@
|
||||
local luasnip = function(opts)
|
||||
require("luasnip").config.set_config(opts)
|
||||
|
||||
-- vscode format
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.vscode_snippets_path or "" }
|
||||
|
||||
-- snipmate format
|
||||
require("luasnip.loaders.from_snipmate").load()
|
||||
require("luasnip.loaders.from_snipmate").lazy_load { paths = vim.g.snipmate_snippets_path or "" }
|
||||
|
||||
-- lua format
|
||||
require("luasnip.loaders.from_lua").load()
|
||||
require("luasnip.loaders.from_lua").lazy_load { paths = vim.g.lua_snippets_path or "" }
|
||||
|
||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||
callback = function()
|
||||
if
|
||||
require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
|
||||
and not require("luasnip").session.jump_active
|
||||
then
|
||||
require("luasnip").unlink_current()
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
return luasnip
|
||||
@@ -0,0 +1,28 @@
|
||||
local options = {
|
||||
ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim
|
||||
|
||||
PATH = "prepand",
|
||||
|
||||
ui = {
|
||||
icons = {
|
||||
package_pending = " ",
|
||||
package_installed = " ",
|
||||
package_uninstalled = " ",
|
||||
},
|
||||
|
||||
keymaps = {
|
||||
toggle_server_expand = "<CR>",
|
||||
install_server = "i",
|
||||
update_server = "u",
|
||||
check_server_version = "c",
|
||||
update_all_servers = "U",
|
||||
check_outdated_servers = "C",
|
||||
uninstall_server = "X",
|
||||
cancel_installation = "<C-c>",
|
||||
},
|
||||
},
|
||||
|
||||
max_concurrent_installers = 10,
|
||||
}
|
||||
|
||||
return options
|
||||
@@ -0,0 +1,46 @@
|
||||
local M = {
|
||||
lsp = {
|
||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||
override = {
|
||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
["vim.lsp.util.stylize_markdown"] = true,
|
||||
},
|
||||
},
|
||||
-- you can enable a preset for easier configuration
|
||||
presets = {
|
||||
bottom_search = true, -- use a classic bottom cmdline for search
|
||||
command_palette = true, -- position the cmdline and popupmenu together
|
||||
long_message_to_split = true, -- long messages will be sent to a split
|
||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||
lsp_doc_border = false, -- add a border to hover docs and signature help
|
||||
},
|
||||
views = {
|
||||
cmdline_popup = {
|
||||
-- border = {
|
||||
-- style = "none",
|
||||
-- padding = { 2, 3 },
|
||||
-- },
|
||||
-- position = {
|
||||
-- row = "85%",
|
||||
-- col = "50%",
|
||||
-- },
|
||||
size = {
|
||||
width = 120,
|
||||
height = "auto",
|
||||
},
|
||||
},
|
||||
popupmenu = {
|
||||
-- relative = "editor",
|
||||
-- position = {
|
||||
-- row = 25,
|
||||
-- col = "50%",
|
||||
-- },
|
||||
size = {
|
||||
width = 120,
|
||||
-- height = 10,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
||||
@@ -0,0 +1,77 @@
|
||||
local options = {
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
exclude = { vim.fn.stdpath "config" .. "/lua/custom" },
|
||||
},
|
||||
disable_netrw = true,
|
||||
hijack_netrw = true,
|
||||
hijack_cursor = true,
|
||||
hijack_unnamed_buffer_when_opening = false,
|
||||
sync_root_with_cwd = true,
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
update_root = false,
|
||||
},
|
||||
view = {
|
||||
adaptive_size = false,
|
||||
side = "left",
|
||||
width = 30,
|
||||
preserve_window_proportions = true,
|
||||
},
|
||||
git = {
|
||||
enable = false,
|
||||
ignore = true,
|
||||
},
|
||||
filesystem_watchers = {
|
||||
enable = true,
|
||||
},
|
||||
actions = {
|
||||
open_file = {
|
||||
resize_window = true,
|
||||
},
|
||||
},
|
||||
renderer = {
|
||||
root_folder_label = false,
|
||||
highlight_git = false,
|
||||
highlight_opened_files = "none",
|
||||
|
||||
indent_markers = {
|
||||
enable = false,
|
||||
},
|
||||
|
||||
icons = {
|
||||
show = {
|
||||
file = true,
|
||||
folder = true,
|
||||
folder_arrow = true,
|
||||
git = false,
|
||||
},
|
||||
|
||||
glyphs = {
|
||||
default = "",
|
||||
symlink = "",
|
||||
folder = {
|
||||
default = "",
|
||||
empty = "",
|
||||
empty_open = "",
|
||||
open = "",
|
||||
symlink = "",
|
||||
symlink_open = "",
|
||||
arrow_open = "",
|
||||
arrow_closed = "",
|
||||
},
|
||||
git = {
|
||||
unstaged = "✗",
|
||||
staged = "✓",
|
||||
unmerged = "",
|
||||
renamed = "➜",
|
||||
untracked = "★",
|
||||
deleted = "",
|
||||
ignored = "◌",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return options
|
||||
@@ -0,0 +1,48 @@
|
||||
-- See: https://github.com/neovim/nvim-lspconfig/tree/54eb2a070a4f389b1be0f98070f81d23e2b1a715#suggested-configuration
|
||||
local opts = { noremap = true, silent = true }
|
||||
vim.keymap.set("n", "<space>k", vim.diagnostic.open_float, opts)
|
||||
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts)
|
||||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts)
|
||||
-- vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
||||
|
||||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
local on_attach = function(_, bufnr)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")
|
||||
|
||||
-- Mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
local bufopts = { noremap = true, silent = true, buffer = bufnr }
|
||||
-- vim.keymap.set("n", "gD", vim.lsp.buf.declaration, bufopts)
|
||||
-- vim.keymap.set("n", "gd", vim.lsp.buf.definition, bufopts)
|
||||
-- vim.keymap.set("n", "K", vim.lsp.buf.hover, bufopts)
|
||||
-- vim.keymap.set("n", "gi", vim.lsp.buf.implementation, bufopts)
|
||||
-- vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
|
||||
-- vim.keymap.set("n", "<space>wa", vim.lsp.buf.add_workspace_folder, bufopts)
|
||||
-- vim.keymap.set("n", "<space>wr", vim.lsp.buf.remove_workspace_folder, bufopts)
|
||||
-- vim.keymap.set("n", "<space>wl", function()
|
||||
-- print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
-- end, bufopts)
|
||||
|
||||
-- vim.keymap.set("n", "<space>D", vim.lsp.buf.type_definition, bufopts)
|
||||
-- vim.keymap.set("n", "<space>rn", vim.lsp.buf.rename, bufopts)
|
||||
vim.keymap.set("n", "<space>ca", vim.lsp.buf.code_action, bufopts)
|
||||
-- vim.keymap.set("n", "gr", vim.lsp.buf.references, bufopts)
|
||||
-- vim.keymap.set("n", "<space>f", function()
|
||||
-- vim.lsp.buf.format { async = true }
|
||||
-- end, bufopts)
|
||||
end
|
||||
|
||||
-- Configure `ruff-lsp`.
|
||||
-- See: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ruff_lsp
|
||||
-- For the default config, along with instructions on how to customize the settings
|
||||
require("lspconfig").ruff_lsp.setup {
|
||||
on_attach = on_attach,
|
||||
init_options = {
|
||||
settings = {
|
||||
-- Any extra CLI arguments for `ruff` go here.
|
||||
args = { "--ignore", "E741" },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
{ "Replace {{X}} with {{ X }} in jinja template", "%s/{{\\(.[^ ]*\\)}}/{{ \\1 }}/g" },
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
-- Implement delta as previewer for diffs
|
||||
|
||||
local previewers = require "telescope.previewers"
|
||||
local builtin = require "telescope.builtin"
|
||||
local pickers = require "telescope.pickers"
|
||||
local finders = require "telescope.finders"
|
||||
local actions = require "telescope.actions"
|
||||
local action_state = require "telescope.actions.state"
|
||||
local conf = require("telescope.config").values
|
||||
|
||||
local E = {}
|
||||
|
||||
local delta = previewers.new_termopen_previewer {
|
||||
get_command = function(entry)
|
||||
-- this is for status
|
||||
-- You can get the AM things in entry.status. So we are displaying file if entry.status == '??' or 'A '
|
||||
-- just do an if and return a different command
|
||||
if entry.status == "??" or "A " then
|
||||
return { "git", "-c", "core.pager=delta", "-c", "delta.side-by-side=false", "diff", entry.value }
|
||||
end
|
||||
|
||||
-- note we can't use pipes
|
||||
-- this command is for git_commits and git_bcommits
|
||||
return { "git", "-c", "core.pager=delta", "-c", "delta.side-by-side=false", "diff", entry.value .. "^!" }
|
||||
end,
|
||||
}
|
||||
|
||||
E.my_git_commits = function(opts)
|
||||
opts = opts or {}
|
||||
opts.previewer = delta
|
||||
|
||||
builtin.git_commits(opts)
|
||||
end
|
||||
|
||||
E.my_git_bcommits = function(opts)
|
||||
opts = opts or {}
|
||||
opts.previewer = delta
|
||||
|
||||
builtin.git_bcommits(opts)
|
||||
end
|
||||
|
||||
E.my_git_status = function(opts)
|
||||
opts = opts or {}
|
||||
opts.previewer = delta
|
||||
|
||||
builtin.git_status(opts)
|
||||
end
|
||||
|
||||
E.my_git_branches = function(opts)
|
||||
opts = opts or {}
|
||||
opts.previewer = delta
|
||||
|
||||
builtin.git_branches(opts)
|
||||
end
|
||||
|
||||
E.project_files = function()
|
||||
local opts = {} -- define here if you want to define something
|
||||
vim.fn.system "git rev-parse --is-inside-work-tree"
|
||||
if vim.v.shell_error == 0 then
|
||||
require("telescope.builtin").git_files(opts)
|
||||
else
|
||||
require("telescope.builtin").find_files(opts)
|
||||
end
|
||||
end
|
||||
|
||||
local custom_commands = require "configs.telescope.commands"
|
||||
|
||||
E.cpickers = function(opts)
|
||||
opts = opts or {}
|
||||
pickers
|
||||
.new(opts, {
|
||||
prompt_title = "Commands",
|
||||
|
||||
finder = finders.new_table {
|
||||
results = custom_commands,
|
||||
entry_maker = function(entry)
|
||||
return {
|
||||
value = entry,
|
||||
display = entry[1],
|
||||
ordinal = entry[2],
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
previewer = previewers.new_buffer_previewer {
|
||||
title = "Custom commands preview",
|
||||
define_preview = function(self, entry, _)
|
||||
vim.api.nvim_buf_set_lines(self.state.bufnr, 0, -1, false, {
|
||||
entry["ordinal"],
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
attach_mappings = function(prompt_bufnr, _)
|
||||
actions.select_default:replace(function()
|
||||
actions.close(prompt_bufnr)
|
||||
local selection = action_state.get_selected_entry()
|
||||
vim.cmd(selection.ordinal)
|
||||
end)
|
||||
return true
|
||||
end,
|
||||
|
||||
sorter = conf.generic_sorter(opts),
|
||||
})
|
||||
:find()
|
||||
end
|
||||
|
||||
return E
|
||||
@@ -0,0 +1,351 @@
|
||||
local custom_actions = {}
|
||||
local actions = require "telescope.actions"
|
||||
local lga_actions = require "telescope-live-grep-args.actions"
|
||||
local action_state = require "telescope.actions.state"
|
||||
local from_entry = require "telescope.from_entry"
|
||||
local scan = require "plenary.scandir"
|
||||
local pickers = require "telescope.pickers"
|
||||
local finders = require "telescope.finders"
|
||||
local make_entry = require "telescope.make_entry"
|
||||
local action_set = require "telescope.actions.set"
|
||||
local conf = require("telescope.config").values
|
||||
local builtin = require "telescope.builtin"
|
||||
|
||||
-- Usefull:
|
||||
-- [[
|
||||
-- https://github.com/JoosepAlviste/dotfiles/blob/master/config/nvim/lua/j/telescope_custom_pickers.lua
|
||||
-- ]]
|
||||
|
||||
local entry_to_qf = function(entry)
|
||||
local text = entry.text
|
||||
|
||||
if not text then
|
||||
if type(entry.value) == "table" then
|
||||
text = entry.value.text
|
||||
else
|
||||
text = entry.value
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
bufnr = entry.bufnr,
|
||||
filename = from_entry.path(entry, false, false),
|
||||
lnum = vim.F.if_nil(entry.lnum, 1),
|
||||
col = vim.F.if_nil(entry.col, 1),
|
||||
text = text,
|
||||
}
|
||||
end
|
||||
|
||||
local send_selected_to_list_without_closing_prompt = function(prompt_bufnr, mode, target)
|
||||
local picker = action_state.get_current_picker(prompt_bufnr)
|
||||
|
||||
local qf_entries = {}
|
||||
for _, entry in ipairs(picker:get_multi_selection()) do
|
||||
table.insert(qf_entries, entry_to_qf(entry))
|
||||
end
|
||||
|
||||
local prompt = picker:_get_prompt()
|
||||
-- actions.close(prompt_bufnr)
|
||||
|
||||
vim.api.nvim_exec_autocmds("QuickFixCmdPre", {})
|
||||
if target == "loclist" then
|
||||
vim.fn.setloclist(picker.original_win_id, qf_entries, mode)
|
||||
else
|
||||
local qf_title = string.format([[%s (%s)]], picker.prompt_title, prompt)
|
||||
vim.fn.setqflist(qf_entries, mode)
|
||||
vim.fn.setqflist({}, "a", { title = qf_title })
|
||||
end
|
||||
vim.api.nvim_exec_autocmds("QuickFixCmdPost", {})
|
||||
end
|
||||
|
||||
function custom_actions._multiopen(prompt_bufnr, cmd, cmd2, mode, list)
|
||||
-- actions.send_selected_to_loclist(prompt_bufnr)
|
||||
local picker = action_state.get_current_picker(prompt_bufnr)
|
||||
local multi = picker:get_multi_selection()
|
||||
local single = picker:get_selection()
|
||||
|
||||
local str = ""
|
||||
|
||||
if #multi > 0 then
|
||||
send_selected_to_list_without_closing_prompt(prompt_bufnr, mode, list)
|
||||
|
||||
for i, j in ipairs(multi) do
|
||||
if i % 2 == 1 then
|
||||
str = str .. cmd .. " " .. j[1] .. " | "
|
||||
else
|
||||
str = str .. cmd2 .. " " .. j[1] .. " | "
|
||||
end
|
||||
end
|
||||
else
|
||||
str = cmd .. " " .. single[1]
|
||||
end
|
||||
|
||||
-- To avoid populating qf or doing ":edit! file", close the prompt first
|
||||
actions.close(prompt_bufnr)
|
||||
vim.api.nvim_command(str)
|
||||
end
|
||||
|
||||
function custom_actions.multi_selection_open(prompt_bufnr)
|
||||
return custom_actions._multiopen(prompt_bufnr, "edit", "edit", "a", "loclist")
|
||||
end
|
||||
|
||||
function custom_actions.multi_selection_vsplit(prompt_bufnr)
|
||||
return custom_actions._multiopen(prompt_bufnr, "vsplit", "split", "a", "loclist")
|
||||
end
|
||||
|
||||
function custom_actions.multi_selection_split(prompt_bufnr)
|
||||
return custom_actions._multiopen(prompt_bufnr, "split", "vsplit", "a", "loclist")
|
||||
end
|
||||
|
||||
function custom_actions.multi_selection_vtab(prompt_bufnr)
|
||||
return custom_actions._multiopen(prompt_bufnr, "tabe", "tabe", "a", "loclist")
|
||||
end
|
||||
|
||||
function custom_actions.set_extension(prompt_bufnr)
|
||||
local current_input = action_state.get_current_line()
|
||||
|
||||
vim.ui.input({ prompt = "Search in extension: *." }, function(input)
|
||||
if input == nil then
|
||||
return
|
||||
end
|
||||
|
||||
-- Close and reopen a prompt with the same input
|
||||
actions.close(prompt_bufnr)
|
||||
builtin.live_grep { default_text = current_input, type_filter = input }
|
||||
end)
|
||||
end
|
||||
|
||||
function custom_actions.to_live_grep_args(prompt_bufnr)
|
||||
local current_input = action_state.get_current_line()
|
||||
|
||||
-- Close and reopen a prompt with live_grep_args
|
||||
actions.close(prompt_bufnr)
|
||||
require("telescope").extensions.live_grep_args.live_grep_args { default_text = current_input }
|
||||
end
|
||||
|
||||
function custom_actions.set_folders(prompt_bufnr)
|
||||
local current_input = action_state.get_current_line()
|
||||
|
||||
local data = {}
|
||||
scan.scan_dir(vim.loop.cwd(), {
|
||||
hidden = true,
|
||||
only_dirs = true,
|
||||
respect_gitignore = true,
|
||||
on_insert = function(entry)
|
||||
table.insert(data, entry .. "/")
|
||||
end,
|
||||
})
|
||||
table.insert(data, 1, "./")
|
||||
|
||||
actions.close(prompt_bufnr)
|
||||
-- Create a new picker with Telescope to select folders we want to filter in
|
||||
pickers
|
||||
.new({
|
||||
prompt_title = 'Select folders for current ("' .. current_input .. '") search',
|
||||
finder = finders.new_table { results = data, entry_maker = make_entry.gen_from_file {} },
|
||||
previewer = conf.file_previewer {},
|
||||
sorter = conf.file_sorter {},
|
||||
attach_mappings = function(prompt_bufnr2)
|
||||
action_set.select:replace(function()
|
||||
local current_picker = action_state.get_current_picker(prompt_bufnr2)
|
||||
|
||||
local dirs = {}
|
||||
local selections = current_picker:get_multi_selection()
|
||||
if vim.tbl_isempty(selections) then
|
||||
table.insert(dirs, action_state.get_selected_entry().value)
|
||||
else
|
||||
for _, selection in ipairs(selections) do
|
||||
table.insert(dirs, selection.value)
|
||||
end
|
||||
end
|
||||
|
||||
actions.close(prompt_bufnr2)
|
||||
builtin.live_grep { default_text = current_input, search_dirs = dirs }
|
||||
end)
|
||||
return true
|
||||
end,
|
||||
})
|
||||
:find()
|
||||
end
|
||||
|
||||
function custom_actions.set_files(prompt_bufnr)
|
||||
local current_input = action_state.get_current_line()
|
||||
local find_command = { "rg", "--files", "--color=never", "--no-heading" }
|
||||
actions.close(prompt_bufnr)
|
||||
if current_input ~= "" then
|
||||
find_command = { "rg", "--color=never", "--no-heading", "-l", current_input }
|
||||
end
|
||||
|
||||
local opts = {
|
||||
entry_maker = make_entry.gen_from_file(),
|
||||
find_command = find_command,
|
||||
}
|
||||
|
||||
print(vim.inspect(find_command))
|
||||
-- Create a new picker with Telescope to select files we want to filter in
|
||||
pickers
|
||||
.new(opts, {
|
||||
prompt_title = 'Select files for current ("' .. current_input .. '") search',
|
||||
__locations_input = true,
|
||||
finder = finders.new_oneshot_job(find_command, opts),
|
||||
previewer = conf.grep_previewer(opts),
|
||||
sorter = conf.file_sorter(opts),
|
||||
attach_mappings = function(prompt_bufnr2)
|
||||
actions.select_default:replace(function()
|
||||
local current_picker = action_state.get_current_picker(prompt_bufnr2)
|
||||
|
||||
local files = {}
|
||||
local selections = current_picker:get_multi_selection()
|
||||
if vim.tbl_isempty(selections) then
|
||||
local entry = action_state.get_selected_entry()
|
||||
table.insert(files, entry.value)
|
||||
else
|
||||
for _, selection in ipairs(selections) do
|
||||
table.insert(files, selection.value)
|
||||
end
|
||||
end
|
||||
|
||||
-- Close the preview picker and select a new one, restricted to the files selected
|
||||
actions.close(prompt_bufnr2)
|
||||
builtin.live_grep { default_text = current_input, search_dirs = files }
|
||||
end)
|
||||
return true
|
||||
end,
|
||||
})
|
||||
:find()
|
||||
end
|
||||
|
||||
local options = {
|
||||
defaults = {
|
||||
vimgrep_arguments = {
|
||||
"rg",
|
||||
"-L",
|
||||
"--color=never",
|
||||
"--no-heading",
|
||||
"--with-filename",
|
||||
"--line-number",
|
||||
"--column",
|
||||
"--smart-case",
|
||||
},
|
||||
prompt_prefix = " ",
|
||||
selection_caret = " ",
|
||||
entry_prefix = " ",
|
||||
initial_mode = "insert",
|
||||
selection_strategy = "reset",
|
||||
sorting_strategy = "ascending",
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = {
|
||||
horizontal = {
|
||||
prompt_position = "top",
|
||||
preview_width = 0.60,
|
||||
results_width = 0.8,
|
||||
},
|
||||
vertical = {
|
||||
mirror = false,
|
||||
},
|
||||
width = 0.90,
|
||||
height = 0.92,
|
||||
preview_cutoff = 200,
|
||||
},
|
||||
file_sorter = require("telescope.sorters").get_fuzzy_file,
|
||||
file_ignore_patterns = { "node_modules" },
|
||||
generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,
|
||||
path_display = { "truncate" },
|
||||
winblend = 0,
|
||||
border = {},
|
||||
borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },
|
||||
color_devicons = true,
|
||||
set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil,
|
||||
file_previewer = require("telescope.previewers").vim_buffer_cat.new,
|
||||
grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new,
|
||||
qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new,
|
||||
-- Developer configurations: Not meant for general override
|
||||
buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker,
|
||||
mappings = {
|
||||
n = { ["q"] = actions.close },
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
buffers = {
|
||||
show_all_buffers = true,
|
||||
sort_lastused = true,
|
||||
mappings = {
|
||||
n = {
|
||||
["d"] = "delete_buffer",
|
||||
},
|
||||
i = {
|
||||
["<C-d>"] = "delete_buffer",
|
||||
},
|
||||
},
|
||||
},
|
||||
find_files = {
|
||||
mappings = {
|
||||
i = {
|
||||
-- Fuzzy refine ("Freeze the current list and start a fuzzy search in the frozen list")
|
||||
["<C-i>"] = actions.to_fuzzy_refine,
|
||||
|
||||
-- Send to qflist or loclist
|
||||
["<C-l>"] = actions.smart_send_to_loclist,
|
||||
["<C-Space>"] = actions.smart_send_to_qflist,
|
||||
|
||||
-- Multi selection open
|
||||
["<CR>"] = custom_actions.multi_selection_open,
|
||||
["<C-v>"] = custom_actions.multi_selection_vsplit,
|
||||
["<C-X>"] = custom_actions.multi_selection_split,
|
||||
["<C-T>"] = custom_actions.multi_selection_tab,
|
||||
},
|
||||
n = i,
|
||||
},
|
||||
},
|
||||
live_grep = {
|
||||
mappings = {
|
||||
i = {
|
||||
-- Fuzzy refine ("Freeze the current list and start a fuzzy search in the frozen list")
|
||||
["<C-i>"] = actions.to_fuzzy_refine,
|
||||
|
||||
-- Send to qflist or loclist
|
||||
["<C-l>"] = actions.smart_send_to_loclist,
|
||||
["<C-Space>"] = actions.smart_send_to_qflist,
|
||||
|
||||
-- To quote prompt -> Pass to live_grep_args
|
||||
["<C-k>"] = custom_actions.to_live_grep_args,
|
||||
|
||||
-- Search for files/folder/extensions
|
||||
["<C-f>"] = custom_actions.set_files,
|
||||
["<C-g>"] = custom_actions.set_folders,
|
||||
["<C-e>"] = custom_actions.set_extension,
|
||||
},
|
||||
n = i,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
extensions_list = { "themes", "terms", "fzf", "macrothis", "live_grep_args", "advanced_git_search" },
|
||||
extensions = {
|
||||
fzf = {
|
||||
fuzzy = true,
|
||||
override_generic_sorter = true,
|
||||
override_file_sorter = true,
|
||||
case_mode = "smart_case",
|
||||
},
|
||||
live_grep_args = {
|
||||
auto_quoting = true,
|
||||
mappings = {
|
||||
i = {
|
||||
-- Fuzzy refine ("Freeze the current list and start a fuzzy search in the frozen list")
|
||||
["<C-i>"] = actions.to_fuzzy_refine,
|
||||
|
||||
-- Send to qflist or loclist
|
||||
["<C-l>"] = actions.smart_send_to_loclist,
|
||||
["<C-Space>"] = actions.smart_send_to_qflist,
|
||||
|
||||
-- Quote prompt, for passing parameters to vimgrep
|
||||
["<C-k>"] = lga_actions.quote_prompt(),
|
||||
},
|
||||
},
|
||||
advanced_git_search = {},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return options
|
||||
@@ -0,0 +1,12 @@
|
||||
local options = {
|
||||
ensure_installed = { "lua", "vim", "vimdoc" },
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
use_languagetree = true,
|
||||
},
|
||||
|
||||
indent = { enable = true },
|
||||
}
|
||||
|
||||
return options
|
||||
@@ -0,0 +1,133 @@
|
||||
local M = {}
|
||||
|
||||
M.textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
|
||||
-- Automatically jump forward to textobj, similar to targets.vim
|
||||
lookahead = true,
|
||||
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["a="] = { query = "@assignment.outer", desc = "Select outer part of an assignment" },
|
||||
["i="] = { query = "@assignment.inner", desc = "Select inner part of an assignment" },
|
||||
["l="] = { query = "@assignment.lhs", desc = "Select left hand side of an assignment" },
|
||||
["r="] = { query = "@assignment.rhs", desc = "Select right hand side of an assignment" },
|
||||
|
||||
["aa"] = { query = "@parameter.outer", desc = "Select outer part of a parameter/argument" },
|
||||
["ia"] = { query = "@parameter.inner", desc = "Select inner part of a parameter/argument" },
|
||||
|
||||
["ai"] = { query = "@conditional.outer", desc = "Select outer part of a conditional" },
|
||||
["ii"] = { query = "@conditional.inner", desc = "Select inner part of a conditional" },
|
||||
|
||||
["al"] = { query = "@loop.outer", desc = "Select outer part of a loop" },
|
||||
["il"] = { query = "@loop.inner", desc = "Select inner part of a loop" },
|
||||
|
||||
["af"] = { query = "@call.outer", desc = "Select outer part of a function call" },
|
||||
["if"] = { query = "@call.inner", desc = "Select inner part of a function call" },
|
||||
|
||||
["am"] = { query = "@function.outer", desc = "Select outer part of a function def" },
|
||||
["im"] = { query = "@function.inner", desc = "Select inner part of a function def" },
|
||||
|
||||
["ak"] = { query = "@class.outer", desc = "Select outer part of a class" },
|
||||
["ik"] = { query = "@class.inner", desc = "Select inner part of a class" },
|
||||
|
||||
["ac"] = { query = "@comment.outer", desc = "Select outer part of a comment" },
|
||||
["ic"] = { query = "@comment.inner", desc = "Select inner part of a comment" },
|
||||
},
|
||||
},
|
||||
move = {
|
||||
enable = true,
|
||||
-- Whether to set jumps in the jumplist
|
||||
set_jumps = true,
|
||||
goto_next_start = {
|
||||
["]a"] = { query = "@parameter.outer", desc = "Goto next start outer parameter" },
|
||||
["]i"] = { query = "@conditional.outer", desc = "Goto next start outer conditional" },
|
||||
["]l"] = { query = "@loop.outer", desc = "Goto next start outer loop" },
|
||||
["]f"] = { query = "@call.outer", desc = "Goto next start outer call" },
|
||||
["]m"] = { query = "@function.outer", desc = "Goto next start outer function" },
|
||||
["]k"] = { query = "@class.outer", desc = "Goto next start outer class" },
|
||||
["]c"] = { query = "@comment.outer", desc = "Goto next start outer comment" },
|
||||
},
|
||||
goto_next_end = {
|
||||
["]A"] = { query = "@parameter.outer", desc = "Goto next end outer parameter" },
|
||||
["]I"] = { query = "@conditional.outer", desc = "Goto next end outer conditional" },
|
||||
["]L"] = { query = "@loop.outer", desc = "Goto next end outer loop" },
|
||||
["]F"] = { query = "@call.outer", desc = "Goto next end outer call" },
|
||||
["]M"] = { query = "@function.outer", desc = "Goto next end outer function" },
|
||||
["]K"] = { query = "@class.outer", desc = "Goto next end outer class" },
|
||||
["]C"] = { query = "@comment.outer", desc = "Goto next end outer comment" },
|
||||
},
|
||||
goto_previous_start = {
|
||||
["[a"] = { query = "@parameter.outer", desc = "Goto previous start outer parameter" },
|
||||
["[i"] = { query = "@conditional.outer", desc = "Goto previous start outer conditional" },
|
||||
["[l"] = { query = "@loop.outer", desc = "Goto previous start outer loop" },
|
||||
["[f"] = { query = "@call.outer", desc = "Goto previous start outer call" },
|
||||
["[m"] = { query = "@function.outer", desc = "Goto previous start outer function" },
|
||||
["[k"] = { query = "@class.outer", desc = "Goto previous start outer class" },
|
||||
["[c"] = { query = "@comment.outer", desc = "Goto previous start outer comment" },
|
||||
},
|
||||
goto_previous_end = {
|
||||
["[A"] = { query = "@parameter.outer", desc = "Goto previous end outer parameter" },
|
||||
["[I"] = { query = "@conditional.outer", desc = "Goto previous end outer conditional" },
|
||||
["[L"] = { query = "@loop.outer", desc = "Goto previous end outer loop" },
|
||||
["[F"] = { query = "@call.outer", desc = "Goto previous end outer call" },
|
||||
["[M"] = { query = "@function.outer", desc = "Goto previous end outer function" },
|
||||
["[K"] = { query = "@class.outer", desc = "Goto previous end outer class" },
|
||||
["[C"] = { query = "@comment.outer", desc = "Goto previous end outer comment" },
|
||||
},
|
||||
},
|
||||
|
||||
swap = {
|
||||
enable = true,
|
||||
|
||||
swap_next = {
|
||||
["<leader>na"] = { query = "@parameter.inner", desc = "Swap with next inner parameter" },
|
||||
["<leader>ni"] = { query = "@conditional.outer", desc = "Swap with next outer conditional" },
|
||||
["<leader>nl"] = { query = "@loop.outer", desc = "Swap with next outer loop" },
|
||||
["<leader>nf"] = { query = "@call.outer", desc = "Swap with next outer call" },
|
||||
["<leader>nm"] = { query = "@function.outer", desc = "Swap with next outer function" },
|
||||
["<leader>nk"] = { query = "@class.outer", desc = "Swap with next outer class" },
|
||||
["<leader>nc"] = { query = "@comment.outer", desc = "Swap with next outer comment" },
|
||||
|
||||
["<leader>nA"] = { query = "@parameter.outer", desc = "Swap with next outer parameter" },
|
||||
["<leader>nI"] = { query = "@conditional.inner", desc = "Swap with next inner conditional" },
|
||||
["<leader>nL"] = { query = "@loop.inner", desc = "Swap with next inner loop" },
|
||||
["<leader>nF"] = { query = "@call.inner", desc = "Swap with next inner call" },
|
||||
["<leader>nM"] = { query = "@function.inner", desc = "Swap with next inner function" },
|
||||
["<leader>nK"] = { query = "@class.inner", desc = "Swap with next inner class" },
|
||||
["<leader>nC"] = { query = "@comment.inner", desc = "Swap with next inner comment" },
|
||||
},
|
||||
swap_previous = {
|
||||
["<leader>pa"] = { query = "@parameter.inner", desc = "Swap with previous inner parameter" },
|
||||
["<leader>pi"] = { query = "@conditional.outer", desc = "Swap with previous outer conditional" },
|
||||
["<leader>pl"] = { query = "@loop.outer", desc = "Swap with previous outer loop" },
|
||||
["<leader>pf"] = { query = "@call.outer", desc = "Swap with previous outer call" },
|
||||
["<leader>pm"] = { query = "@function.outer", desc = "Swap with previous outer function" },
|
||||
["<leader>pk"] = { query = "@class.outer", desc = "Swap with previous outer class" },
|
||||
["<leader>pc"] = { query = "@comment.outer", desc = "Swap with previous outer comment" },
|
||||
|
||||
["<leader>pA"] = { query = "@parameter.outer", desc = "Swap with previous outer parameter" },
|
||||
["<leader>pI"] = { query = "@conditional.inner", desc = "Swap with previous inner conditional" },
|
||||
["<leader>pL"] = { query = "@loop.inner", desc = "Swap with previous inner loop" },
|
||||
["<leader>pF"] = { query = "@call.inner", desc = "Swap with previous inner call" },
|
||||
["<leader>pM"] = { query = "@function.inner", desc = "Swap with previous inner function" },
|
||||
["<leader>pK"] = { query = "@class.inner", desc = "Swap with previous inner class" },
|
||||
["<leader>pC"] = { query = "@comment.inner", desc = "Swap with previous inner comment" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- local ts_repeat_move = require "nvim-treesitter.textobjects.repeatable_move"
|
||||
|
||||
-- Repeat movement with ; and ,
|
||||
-- vim.keymap.set({"n", "x", "o"}, ",", ts_repeat_move.repeat_last_move_next)
|
||||
-- vim.keymap.set({"n", "x", "o"}, ",", ts_repeat_move.repeat_last_move_previous)
|
||||
|
||||
-- Optionnally, make builtin f, F, t, T also repeatable with ; and ,
|
||||
-- vim.keymap.set({"n", "x", "o"}, "f", ts_repeat_move.builtin_f)
|
||||
-- vim.keymap.set({"n", "x", "o"}, "F", ts_repeat_move.builtin_F)
|
||||
-- vim.keymap.set({"n", "x", "o"}, "t", ts_repeat_move.builtin_t)
|
||||
-- vim.keymap.set({"n", "x", "o"}, "T", ts_repeat_move.builtin_T)
|
||||
|
||||
return M
|
||||
Reference in New Issue
Block a user