mirror of
https://github.com/kristoferssolo/SoloVim.git
synced 2026-02-04 06:42:05 +00:00
Update 2024-07-13
This commit is contained in:
22
lua/plugins/autopairs.lua
Normal file
22
lua/plugins/autopairs.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
opts = {
|
||||
disable_filetype = { "TelescopePrompt", "spectre_panel" },
|
||||
disable_in_macro = true, -- disable when recording or executing a macro
|
||||
disable_in_visualblock = false, -- disable when insert after visual block mode
|
||||
disable_in_replace_mode = true,
|
||||
ignored_next_char = [=[[%w%%%'%[%"%.%`%$]]=],
|
||||
enable_moveright = true,
|
||||
enable_afterquote = true, -- add bracket pairs after quote
|
||||
enable_check_bracket_line = true, --- check bracket in same line
|
||||
enable_bracket_in_quote = true,
|
||||
enable_abbr = false, -- trigger abbreviation
|
||||
break_undo = true, -- switch for basic rule break undo sequence
|
||||
check_ts = false,
|
||||
map_cr = true,
|
||||
map_bs = true, -- map the <BS> key
|
||||
map_c_h = false, -- Map the <C-h> key to delete a pair
|
||||
map_c_w = true, -- map <c-w> to delete a pair if possible
|
||||
},
|
||||
}
|
||||
@@ -4,7 +4,6 @@ return {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"hrsh7th/nvim-cmp",
|
||||
},
|
||||
config = function()
|
||||
require("codeium").setup({})
|
||||
end,
|
||||
commit = "d3b88eb",
|
||||
config = true,
|
||||
}
|
||||
|
||||
@@ -13,29 +13,20 @@ return {
|
||||
},
|
||||
lualine_bold = true,
|
||||
},
|
||||
config = function()
|
||||
require("tokyonight").setup({
|
||||
style = "night",
|
||||
transparent = true,
|
||||
styles = {
|
||||
keywords = { italic = false },
|
||||
sidebars = "transparent",
|
||||
floats = "transparent",
|
||||
},
|
||||
lualine_bold = true,
|
||||
})
|
||||
config = function(_, opts)
|
||||
require("tokyonight").setup(opts)
|
||||
vim.cmd.colorscheme("tokyonight")
|
||||
end,
|
||||
},
|
||||
{ "lunarvim/darkplus.nvim" },
|
||||
{ "catppuccin/nvim" },
|
||||
{ "catppuccin/nvim", name = "catppuccin.nvim" },
|
||||
{ "Mofiqul/dracula.nvim" },
|
||||
{ "rebelot/kanagawa.nvim" },
|
||||
{ "EdenEast/nightfox.nvim" },
|
||||
{ "navarasu/onedark.nvim" },
|
||||
{ "savq/melange-nvim" },
|
||||
{ "savq/melange-nvim", name = "melange.nvim" },
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
{ "bluz71/vim-nightfly-colors", name = "nightfly" },
|
||||
{ "rose-pine/neovim" },
|
||||
{ "bluz71/vim-nightfly-colors", name = "nightfly.nvim" },
|
||||
{ "rose-pine/neovim", name = "rose-pine.nvim" },
|
||||
{ "slugbyte/lackluster.nvim" },
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ return {
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
python = { "auto_optional", "ruff", "ruff_fix", "ruff_organize_imports" },
|
||||
python = { "ruff", "ruff_fix", "ruff_organize_imports" },
|
||||
go = { "goimports", "gofmt" },
|
||||
javascript = js,
|
||||
javascriptreact = js,
|
||||
|
||||
@@ -7,12 +7,12 @@ return {
|
||||
"<leader>ru",
|
||||
require("crates").upgrade_all_crates,
|
||||
desc = "[U]pgrade all crates",
|
||||
ft = { "rust", "toml" },
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
smart_insert = true,
|
||||
insert_closing_quote = true,
|
||||
avoid_prerelease = true,
|
||||
autoload = true,
|
||||
autoupdate = true,
|
||||
loading_indicator = true,
|
||||
@@ -132,16 +132,12 @@ return {
|
||||
jump_back = { "<c-o>", "<C-RightMouse>" },
|
||||
},
|
||||
},
|
||||
src = {
|
||||
--[[ src = {
|
||||
insert_closing_quote = true,
|
||||
text = {
|
||||
prerelease = " pre-release ",
|
||||
yanked = " yanked ",
|
||||
},
|
||||
},
|
||||
--[[ null_ls = {
|
||||
enabled = true,
|
||||
name = "crates.nvim",
|
||||
}, ]]
|
||||
},
|
||||
}
|
||||
|
||||
25
lua/plugins/curl.lua
Normal file
25
lua/plugins/curl.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
return {
|
||||
"oysandvik94/curl.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>co",
|
||||
vim.cmd.CurlOpen,
|
||||
desc = "[C]url [O]pen",
|
||||
},
|
||||
{
|
||||
"<leader>cc",
|
||||
vim.cmd.CurlClose,
|
||||
desc = "[C]url [C]lose",
|
||||
},
|
||||
},
|
||||
cmd = { "CurlOpen", "CurlClose" },
|
||||
opts = {
|
||||
default_flags = {},
|
||||
mappings = {
|
||||
execute_curl = "<CR>",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -5,6 +5,9 @@ return {
|
||||
{ "tpope/vim-dadbod", lazy = true },
|
||||
{ "kristijanhusak/vim-dadbod-completion", ft = { "sql", "mysql", "plsql" }, lazy = true },
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>od", vim.cmd.DBUIToggle, desc = "Toggle [D]adbod UI" },
|
||||
},
|
||||
cmd = {
|
||||
"DBUI",
|
||||
"DBUIToggle",
|
||||
|
||||
@@ -2,14 +2,14 @@ return {
|
||||
"emmanueltouzery/decisive.nvim",
|
||||
keys = {
|
||||
{
|
||||
"<leader>cca",
|
||||
"<leader>cCa",
|
||||
function()
|
||||
require("decisive").align_csv({})
|
||||
end,
|
||||
desc = "align CSV",
|
||||
},
|
||||
{
|
||||
"<leader>ccA",
|
||||
"<leader>cCA",
|
||||
function()
|
||||
require("decisive").align_csv_clear({})
|
||||
end,
|
||||
|
||||
@@ -1,12 +1,83 @@
|
||||
return {
|
||||
"MysticalDevil/inlay-hints.nvim",
|
||||
event = "LspAttach",
|
||||
dependencies = { "neovim/nvim-lspconfig" },
|
||||
keys = {
|
||||
{ "<leader>oi", vim.cmd.InlayHintsToggle, desc = "Toggle InlayHints" },
|
||||
{
|
||||
"MysticalDevil/inlay-hints.nvim",
|
||||
event = "LspAttach",
|
||||
dependencies = { "neovim/nvim-lspconfig" },
|
||||
keys = {
|
||||
{ "<leader>oi", vim.cmd.InlayHintsToggle, desc = "Toggle InlayHints" },
|
||||
},
|
||||
opts = {
|
||||
commands = { enable = true }, -- Enable InlayHints commands, include `InlayHintsToggle`, `InlayHintsEnable` and `InlayHintsDisable`
|
||||
autocmd = { enable = true }, -- Enable the inlay hints on `LspAttach` event
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
commands = { enable = true }, -- Enable InlayHints commands, include `InlayHintsToggle`, `InlayHintsEnable` and `InlayHintsDisable`
|
||||
autocmd = { enable = true }, -- Enable the inlay hints on `LspAttach` event
|
||||
{
|
||||
"felpafel/inlay-hint.nvim",
|
||||
event = "LspAttach",
|
||||
opts = {
|
||||
virt_text_pos = "eol",
|
||||
highlight_group = "comment",
|
||||
hl_mode = "combine",
|
||||
display_callback = function(line_hints, options, bufnr)
|
||||
if options.virt_text_pos == "inline" then
|
||||
local lhint = {}
|
||||
for _, hint in pairs(line_hints) do
|
||||
local text = ""
|
||||
local label = hint.label
|
||||
if type(label) == "string" then
|
||||
text = label
|
||||
else
|
||||
for _, part in ipairs(label) do
|
||||
text = text .. part.value
|
||||
end
|
||||
end
|
||||
if hint.paddingLeft then
|
||||
text = " " .. text
|
||||
end
|
||||
if hint.paddingRight then
|
||||
text = text .. " "
|
||||
end
|
||||
lhint[#lhint + 1] = { text = text, col = hint.position.character }
|
||||
end
|
||||
return lhint
|
||||
elseif options.virt_text_pos == "eol" or options.virt_text_pos == "right_align" then
|
||||
local k1 = {}
|
||||
local k2 = {}
|
||||
table.sort(line_hints, function(a, b)
|
||||
return a.position.character < b.position.character
|
||||
end)
|
||||
for _, hint in pairs(line_hints) do
|
||||
local label = hint.label
|
||||
local kind = hint.kind
|
||||
local text = ""
|
||||
if type(label) == "string" then
|
||||
text = label
|
||||
else
|
||||
for _, part in ipairs(label) do
|
||||
text = text .. part.value
|
||||
end
|
||||
end
|
||||
if kind == 1 then
|
||||
k1[#k1 + 1] = text:gsub("^:%s*", "")
|
||||
else
|
||||
k2[#k2 + 1] = text:gsub(":$", "")
|
||||
end
|
||||
end
|
||||
local text = ""
|
||||
if #k2 > 0 then
|
||||
text = " <- (" .. table.concat(k2, ",") .. ")"
|
||||
end
|
||||
if #text > 0 then
|
||||
text = text .. " "
|
||||
end
|
||||
if #k1 > 0 then
|
||||
text = text .. " => " .. table.concat(k1, ",")
|
||||
end
|
||||
|
||||
return text
|
||||
end
|
||||
return nil
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
29
lua/plugins/lsp/pylsp.lua
Normal file
29
lua/plugins/lsp/pylsp.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
local M = {}
|
||||
|
||||
M.setup = function(lsp, capabilities)
|
||||
lsp.pylsp.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
autopep8 = { enabled = false },
|
||||
flake8 = { enabled = false },
|
||||
pylint = { enabled = false },
|
||||
yapf = { enabled = false },
|
||||
pydocstyle = { enabled = false },
|
||||
mccabe = { enabled = false },
|
||||
rope_autoimport = { enabled = true },
|
||||
rope_completion = {
|
||||
enabled = true,
|
||||
eager = true,
|
||||
},
|
||||
pycodestyle = {
|
||||
maxLineLength = nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
return M
|
||||
@@ -46,8 +46,8 @@ return {
|
||||
`windows` (shows currently available windows) ]]
|
||||
sections = {
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "branch", "diff" },
|
||||
lualine_c = { "filename", "harpoon2", "lsp_progress" },
|
||||
lualine_b = { "branch" },
|
||||
lualine_c = { "filename", "diff", "harpoon2", "lsp_progress" },
|
||||
lualine_x = { "diagnostics", "encoding", "filetype", "filesize" },
|
||||
lualine_y = { "progress" },
|
||||
lualine_z = { "location" },
|
||||
|
||||
@@ -10,6 +10,7 @@ return {
|
||||
require("markdown-togglecheck").toggle()
|
||||
end,
|
||||
desc = "Toggle Checkmark",
|
||||
ft = "markdown",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
|
||||
@@ -7,7 +7,6 @@ return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
cmd = { "Neogit" },
|
||||
version = "*",
|
||||
keys = {
|
||||
{
|
||||
"<leader>gg",
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
return {
|
||||
"simrat39/rust-tools.nvim",
|
||||
dependencies = { "neovim/nvim-lspconfig" },
|
||||
ft = "rust",
|
||||
enabled = false,
|
||||
opts = {
|
||||
tools = {
|
||||
-- on_initialized = nil,
|
||||
on_initialized = function()
|
||||
vim.api.nvim_create_autocmd(
|
||||
{ "BufEnter", "CursorHold", "InsertLeave", "BufWritePost", "InsertEnter" },
|
||||
{
|
||||
group = vim.api.nvim_create_augroup("InitializeRustAnalyzer", { clear = true }),
|
||||
pattern = { "*.rs" },
|
||||
callback = function()
|
||||
vim.lsp.codelens.refresh()
|
||||
end,
|
||||
}
|
||||
)
|
||||
end,
|
||||
reload_workspace_from_cargo_toml = true,
|
||||
inlay_hints = {
|
||||
auto = true,
|
||||
only_current_line = false,
|
||||
show_parameter_hints = true,
|
||||
parameter_hints_prefix = " <- ",
|
||||
other_hints_prefix = " => ",
|
||||
max_len_align = false,
|
||||
max_len_align_padding = 1,
|
||||
right_align = false,
|
||||
right_align_padding = 7,
|
||||
highlight = "Comment",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
return {
|
||||
"preservim/tagbar",
|
||||
keys = {
|
||||
{ "<leader>b", vim.cmd.TagbarToggle, desc = "Toggle [T]agbar" },
|
||||
{ "<leader>b", vim.cmd.TagbarToggle, desc = "Toggle Tag[b]ar" },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ return {
|
||||
{ "crispgm/telescope-heading.nvim" },
|
||||
{ "benfowler/telescope-luasnip.nvim" },
|
||||
{ "paopaol/telescope-git-diffs.nvim" },
|
||||
{ "debugloop/telescope-undo.nvim" },
|
||||
{ "ThePrimeagen/harpoon", branch = "harpoon2" },
|
||||
{ "ThePrimeagen/git-worktree.nvim" },
|
||||
},
|
||||
@@ -263,26 +262,6 @@ return {
|
||||
-- Wrapping in the preview window is disabled by default
|
||||
wrap = false,
|
||||
},
|
||||
undo = {
|
||||
use_delta = true,
|
||||
use_custom_command = nil, -- setting this implies `use_delta = false`. Accepted format is: { "bash", "-c", "echo '$DIFF' | delta" }
|
||||
side_by_side = false,
|
||||
diff_context_lines = vim.o.scrolloff,
|
||||
entry_format = "state #$ID, $STAT, $TIME",
|
||||
time_format = "",
|
||||
mappings = {
|
||||
i = {
|
||||
-- IMPORTANT: Note that telescope-undo must be available when telescope is configured if
|
||||
-- you want to replicate these defaults and use the following actions. This means
|
||||
-- installing as a dependency of telescope in it's `requirements` and loading this
|
||||
-- extension from there instead of having the separate plugin definition as outlined
|
||||
-- above.
|
||||
["<cr>"] = require("telescope-undo.actions").yank_additions,
|
||||
["<S-cr>"] = require("telescope-undo.actions").yank_deletions,
|
||||
["<C-cr>"] = require("telescope-undo.actions").restore,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
@@ -295,7 +274,6 @@ return {
|
||||
pcall(telescope.load_extension, "luasnip") -- Telescope luasnip
|
||||
pcall(telescope.load_extension, "git_diffs") -- Telescope git_diffs diff_commits
|
||||
pcall(telescope.load_extension, "bibtex") -- Telescope bibtex
|
||||
pcall(telescope.load_extension, "undo") -- Telescope undo
|
||||
pcall(telescope.load_extension, "harpoon")
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -7,134 +7,119 @@ return {
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
"luckasRanarison/tree-sitter-hyprlang",
|
||||
},
|
||||
config = function()
|
||||
local ts_repeat_move = require("nvim-treesitter.textobjects.repeatable_move")
|
||||
opts = {
|
||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||
ensure_installed = { "cpp", "lua", "rust", "python", "markdown", "json", "http", "markdown_inline" }, -- one of "all" or a list of languages
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||
auto_install = true,
|
||||
-- List of parsers to ignore installing (for "all")
|
||||
ignore_install = { "latex" },
|
||||
modules = {},
|
||||
|
||||
-- Repeat movement with ; and ,
|
||||
-- ensure ; goes forward and , goes backward regardless of the last direction
|
||||
vim.keymap.set(
|
||||
{ "n", "x", "o" },
|
||||
";",
|
||||
ts_repeat_move.repeat_last_move_next,
|
||||
{ desc = "Repeat last action and move forward" }
|
||||
)
|
||||
vim.keymap.set(
|
||||
{ "n", "x", "o" },
|
||||
",",
|
||||
ts_repeat_move.repeat_last_move_previous,
|
||||
{ desc = "Repeat last action and move backward" }
|
||||
)
|
||||
require("nvim-treesitter.configs").setup({
|
||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||
ensure_installed = { "cpp", "lua", "rust", "python", "markdown", "json", "http", "markdown_inline" }, -- one of "all" or a list of languages
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||
auto_install = true,
|
||||
-- List of parsers to ignore installing (for "all")
|
||||
ignore_install = { "latex" },
|
||||
modules = {},
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = true,
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
incremenral_selection = {
|
||||
enable = false,
|
||||
keymaps = {
|
||||
init_selection = "<C-leader>",
|
||||
node_selection = "<C-space>",
|
||||
scope_selection = "<C-space>",
|
||||
node_deselection = "<C-backspace>",
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
incremenral_selection = {
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
||||
keymaps = {
|
||||
init_selection = "<C-space>",
|
||||
node_selection = "<C-space>",
|
||||
scope_selection = "<C-space>",
|
||||
node_deselection = "<C-backspace>",
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["aa"] = { query = "@parameter.outer", desc = "Select outer part of a parameter" },
|
||||
["ia"] = { query = "@parameter.inner", desc = "Select inner part of a parameter" },
|
||||
["af"] = { query = "@function.outer", desc = "Select outer part of a function" },
|
||||
["if"] = { query = "@function.inner", desc = "Select inner part of a function" },
|
||||
["ac"] = { query = "@class.outer", desc = "Select outer part of a class region" },
|
||||
["ic"] = { query = "@class.inner", desc = "Select inner part of a class region" },
|
||||
["ii"] = { query = "@conditional.inner", desc = "Select inner part of a conditional" },
|
||||
["ai"] = { query = "@conditional.outer", desc = "Select outer part of a conditional" },
|
||||
["il"] = { query = "@loop.inner", desc = "Select inner part of a loop" },
|
||||
["al"] = { query = "@loop.outer", desc = "Select outer part of a loop" },
|
||||
["at"] = { query = "@comment.outer", desc = "Select outer part of a comment" },
|
||||
["as"] = { query = "@scope", query_group = "locals", desc = "Select language scope" },
|
||||
},
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
-- You can choose the select mode (default is charwise 'v')
|
||||
--
|
||||
-- Can also be a function which gets passed a table with the keys
|
||||
-- * query_string: eg '@function.inner'
|
||||
-- * method: eg 'v' or 'o'
|
||||
-- and should return the mode ('v', 'V', or '<c-v>') or a table
|
||||
-- mapping query_strings to modes.
|
||||
selection_modes = {
|
||||
["@parameter.outer"] = "v", -- charwise
|
||||
["@function.outer"] = "V", -- linewise
|
||||
["@class.outer"] = "<C-v>", -- blockwise
|
||||
},
|
||||
-- If you set this to `true` (default is `false`) then any textobject is
|
||||
-- extended to include preceding or succeeding whitespace. Succeeding
|
||||
-- whitespace has priority in order to act similarly to eg the built-in
|
||||
-- `ap`.
|
||||
--
|
||||
-- Can also be a function which gets passed a table with the keys
|
||||
-- * query_string: eg '@function.inner'
|
||||
-- * selection_mode: eg 'v'
|
||||
-- and should return true of false
|
||||
include_surrounding_whitespace = true,
|
||||
move = {
|
||||
enable = true,
|
||||
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["aa"] = { query = "@parameter.outer", desc = "Select outer part of a parameter" },
|
||||
["ia"] = { query = "@parameter.inner", desc = "Select inner part of a parameter" },
|
||||
["af"] = { query = "@function.outer", desc = "Select outer part of a function" },
|
||||
["if"] = { query = "@function.inner", desc = "Select inner part of a function" },
|
||||
["ac"] = { query = "@class.outer", desc = "Select outer part of a class region" },
|
||||
["ic"] = { query = "@class.inner", desc = "Select inner part of a class region" },
|
||||
["ii"] = { query = "@conditional.inner", desc = "Select inner part of a conditional" },
|
||||
["ai"] = { query = "@conditional.outer", desc = "Select outer part of a conditional" },
|
||||
["il"] = { query = "@loop.inner", desc = "Select inner part of a loop" },
|
||||
["al"] = { query = "@loop.outer", desc = "Select outer part of a loop" },
|
||||
["at"] = { query = "@comment.outer", desc = "Select outer part of a comment" },
|
||||
["as"] = { query = "@scope", query_group = "locals", desc = "Select language scope" },
|
||||
set_jumps = true, -- whether to set jumps in the jumplist
|
||||
goto_next_start = {
|
||||
["]m"] = "@function.outer",
|
||||
["]]"] = "@class.outer",
|
||||
},
|
||||
-- You can choose the select mode (default is charwise 'v')
|
||||
--
|
||||
-- Can also be a function which gets passed a table with the keys
|
||||
-- * query_string: eg '@function.inner'
|
||||
-- * method: eg 'v' or 'o'
|
||||
-- and should return the mode ('v', 'V', or '<c-v>') or a table
|
||||
-- mapping query_strings to modes.
|
||||
selection_modes = {
|
||||
["@parameter.outer"] = "v", -- charwise
|
||||
["@function.outer"] = "V", -- linewise
|
||||
["@class.outer"] = "<C-v>", -- blockwise
|
||||
goto_next_end = {
|
||||
["]M"] = "@function.outer",
|
||||
["]["] = "@class.outer",
|
||||
},
|
||||
-- If you set this to `true` (default is `false`) then any textobject is
|
||||
-- extended to include preceding or succeeding whitespace. Succeeding
|
||||
-- whitespace has priority in order to act similarly to eg the built-in
|
||||
-- `ap`.
|
||||
--
|
||||
-- Can also be a function which gets passed a table with the keys
|
||||
-- * query_string: eg '@function.inner'
|
||||
-- * selection_mode: eg 'v'
|
||||
-- and should return true of false
|
||||
include_surrounding_whitespace = true,
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true, -- whether to set jumps in the jumplist
|
||||
goto_next_start = {
|
||||
["]m"] = "@function.outer",
|
||||
["]]"] = "@class.outer",
|
||||
},
|
||||
goto_next_end = {
|
||||
["]M"] = "@function.outer",
|
||||
["]["] = "@class.outer",
|
||||
},
|
||||
goto_previous_start = {
|
||||
["[m"] = "@function.outer",
|
||||
["[["] = "@class.outer",
|
||||
},
|
||||
goto_previous_end = {
|
||||
["[M"] = "@function.outer",
|
||||
["[]"] = "@class.outer",
|
||||
},
|
||||
-- goto_next = {
|
||||
-- [']i'] = "@conditional.inner",
|
||||
-- },
|
||||
-- goto_previous = {
|
||||
-- ['[i'] = "@conditional.inner",
|
||||
-- }
|
||||
goto_previous_start = {
|
||||
["[m"] = "@function.outer",
|
||||
["[["] = "@class.outer",
|
||||
},
|
||||
swap = {
|
||||
enable = true,
|
||||
swap_next = {
|
||||
["]a"] = "@parameter.inner",
|
||||
},
|
||||
swap_previous = {
|
||||
["[a"] = "@parameter.inner",
|
||||
},
|
||||
goto_previous_end = {
|
||||
["[M"] = "@function.outer",
|
||||
["[]"] = "@class.outer",
|
||||
},
|
||||
-- goto_next = {
|
||||
-- [']i'] = "@conditional.inner",
|
||||
-- },
|
||||
-- goto_previous = {
|
||||
-- ['[i'] = "@conditional.inner",
|
||||
-- }
|
||||
},
|
||||
swap = {
|
||||
enable = true,
|
||||
swap_next = {
|
||||
["]a"] = "@parameter.inner",
|
||||
},
|
||||
swap_previous = {
|
||||
["[a"] = "@parameter.inner",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
vim.cmd.highlight("TreesitterContext guibg=None")
|
||||
vim.cmd.highlight("TreesitterContextLineNumberBottom gui=underline guisp=Grey")
|
||||
end,
|
||||
|
||||
@@ -11,6 +11,7 @@ return {
|
||||
"<leader>lt",
|
||||
vim.cmd.Typecheck,
|
||||
desc = "Run Type Check",
|
||||
ft = { "javascript", "javascriptreact", "json", "jsonc", "typescript", "typescriptreact" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ return {
|
||||
"<leader>ow",
|
||||
vim.cmd.TypstWatch,
|
||||
desc = "Typst watch",
|
||||
ft = "typst",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
|
||||
@@ -2,12 +2,12 @@ return {
|
||||
"lervag/vimtex",
|
||||
ft = "tex",
|
||||
keys = {
|
||||
{ "<leader>Tb", vim.cmd.VimtexCompile, desc = "[B]uild" },
|
||||
{ "<leader>Tv", vim.cmd.VimtexView, desc = "[V]iew" },
|
||||
{ "<leader>Tw", vim.cmd.VimtexCountWords, desc = "[W]ord Count" },
|
||||
{ "<leader>Tt", vim.cmd.VimtexTocToggle, desc = "[T]able of Contents" },
|
||||
{ "<leader>Tc", vim.cmd.VimtexClean, desc = "[C]lean aux" },
|
||||
{ "<leader>Te", vim.cmd.VimtexErrors, desc = "Report [E]rrors" },
|
||||
{ "<leader>Ti", vim.cmd.VimtexInfo, desc = "[I]nfo" },
|
||||
{ "<leader>Tb", vim.cmd.VimtexCompile, desc = "[B]uild", ft = "tex" },
|
||||
{ "<leader>Tv", vim.cmd.VimtexView, desc = "[V]iew", ft = "tex" },
|
||||
{ "<leader>Tw", vim.cmd.VimtexCountWords, desc = "[W]ord Count", ft = "tex" },
|
||||
{ "<leader>Tt", vim.cmd.VimtexTocToggle, desc = "[T]able of Contents", ft = "tex" },
|
||||
{ "<leader>Tc", vim.cmd.VimtexClean, desc = "[C]lean aux", ft = "tex" },
|
||||
{ "<leader>Te", vim.cmd.VimtexErrors, desc = "Report [E]rrors", ft = "tex" },
|
||||
{ "<leader>Ti", vim.cmd.VimtexInfo, desc = "[I]nfo", ft = "tex" },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -36,17 +36,18 @@ return {
|
||||
}
|
||||
|
||||
local mappings = {
|
||||
c = { vim.cmd.bdelete, "[C]lose Buffer" },
|
||||
C = { vim.cmd.bdelete, "[C]lose Buffer" },
|
||||
c = { name = "[C]url" },
|
||||
t = { name = "[T]rouble" },
|
||||
g = { name = "[G]it" },
|
||||
l = { name = "[L]SP" },
|
||||
w = { name = "LSP [W]orkspace" },
|
||||
p = {
|
||||
name = "Telescope",
|
||||
d = { name = "[D]evelopment" },
|
||||
},
|
||||
z = { name = "[Z]en" },
|
||||
r = { name = "[R]ust" },
|
||||
w = { name = "Vim[W]iki" },
|
||||
n = { name = "Gitpad" },
|
||||
m = { name = "Misc" },
|
||||
L = {
|
||||
|
||||
Reference in New Issue
Block a user