mirror of
https://github.com/kristoferssolo/SoloVim.git
synced 2026-02-04 06:42:05 +00:00
chore: remove telescope
This commit is contained in:
@@ -44,6 +44,21 @@ nmap("<S-s>", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], "[S]ubstit
|
||||
|
||||
nmap("Q", "@qj", "Run macro")
|
||||
|
||||
nmap("<leader>oo", "<cmd>update<cr><cmd>source<cr>", "Source current file")
|
||||
|
||||
-- vim.keymap.set({ "n", "v", "x" }, "<leader>y", '"+y', { desc = "Yank to system clipboard" })
|
||||
-- vim.keymap.set("n", "<leader>Y", '"+yy', { desc = "Yank line to system clipboard" })
|
||||
|
||||
-- vim.keymap.set({ "n", "v", "x" }, "<leader>p", '"+p', { desc = "Paste from system clipboard" })
|
||||
-- vim.keymap.set("n", "<leader>P", '"+P', { desc = "Paste before cursor from system clipboard" })
|
||||
|
||||
|
||||
vim.keymap.set("n", "<leader>cf", function()
|
||||
local file_path = vim.fn.expand("%:p")
|
||||
vim.cmd([[call setreg("+", "]] .. vim.fn.escape(file_path, '\\ "') .. '")')
|
||||
print("Copied current file path to clipboard: " .. vim.fn.expand("%:p"))
|
||||
end, { desc = "Copy file path to clipboard" })
|
||||
|
||||
xmap("Q", ":norm @q<CR>", "Run macro")
|
||||
|
||||
xmap("p", '"_dP')
|
||||
|
||||
@@ -1,57 +1,57 @@
|
||||
vim.opt.backup = false -- creates a backup file
|
||||
vim.opt.breakindent = true -- Enable break indent
|
||||
vim.opt.clipboard = "unnamedplus" -- allows neovim to access the system clipboard
|
||||
vim.opt.cmdheight = 1 -- more space in the neovim command line for displaying messages
|
||||
vim.opt.backup = false -- creates a backup file
|
||||
vim.opt.breakindent = true -- Enable break indent
|
||||
vim.opt.clipboard = "unnamedplus" -- allows neovim to access the system clipboard
|
||||
vim.opt.cmdheight = 1 -- more space in the neovim command line for displaying messages
|
||||
vim.opt.colorcolumn = "120"
|
||||
vim.opt.completeopt = { "menuone", "noselect" } -- mostly just for cmp
|
||||
vim.opt.conceallevel = 2 -- so that `` is visible in markdown files
|
||||
vim.opt.cursorcolumn = true -- highlight the current column
|
||||
vim.opt.cursorline = true -- highlight the current line
|
||||
vim.opt.expandtab = true -- convert tabs to spaces
|
||||
vim.opt.fileencoding = "utf-8" -- the encoding written to a file
|
||||
vim.opt.conceallevel = 2 -- so that `` is visible in markdown files
|
||||
vim.opt.cursorcolumn = true -- highlight the current column
|
||||
vim.opt.cursorline = true -- highlight the current line
|
||||
vim.opt.expandtab = true -- convert tabs to spaces
|
||||
vim.opt.fileencoding = "utf-8" -- the encoding written to a file
|
||||
vim.opt.fillchars.eob = " "
|
||||
vim.opt.foldmethod = "manual"
|
||||
vim.opt.foldenable = true
|
||||
vim.opt.foldlevelstart = 99
|
||||
vim.opt.foldcolumn = "1" -- '0' is not bad
|
||||
vim.opt.foldcolumn = "1" -- '0' is not bad
|
||||
vim.opt.guifont = "JetBrainsMono NF:h11" -- the font used in graphical neovim applications
|
||||
vim.opt.hlsearch = false -- highlight all matches on previous search pattern
|
||||
vim.opt.ignorecase = true -- ignore case in search patterns
|
||||
vim.opt.hlsearch = false -- highlight all matches on previous search pattern
|
||||
vim.opt.ignorecase = true -- ignore case in search patterns
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.isfname:append("@-@")
|
||||
vim.opt.iskeyword:append("-")
|
||||
vim.opt.laststatus = 3
|
||||
vim.opt.mouse = "a" -- allow the mouse to be used in neovim
|
||||
vim.opt.number = true -- set numbered lines
|
||||
vim.opt.numberwidth = 4 -- set number column width to 4 {default 4}
|
||||
vim.opt.pumheight = 10 -- pop up menu height
|
||||
vim.opt.mouse = "a" -- allow the mouse to be used in neovim
|
||||
vim.opt.number = true -- set numbered lines
|
||||
vim.opt.numberwidth = 4 -- set number column width to 4 {default 4}
|
||||
vim.opt.pumheight = 10 -- pop up menu height
|
||||
vim.opt.relativenumber = true -- set relative numbered lines
|
||||
vim.opt.ruler = false
|
||||
vim.opt.scrolloff = 8 -- is one of my fav
|
||||
vim.opt.shiftwidth = 4 -- the number of spaces inserted for each indentation
|
||||
vim.opt.scrolloff = 8 -- is one of my fav
|
||||
vim.opt.shiftwidth = 4 -- the number of spaces inserted for each indentation
|
||||
vim.opt.shortmess:append("c")
|
||||
vim.opt.showcmd = false
|
||||
vim.opt.showmode = false -- we don't need to see things like -- INSERT -- anymore
|
||||
vim.opt.showtabline = 0 -- disable tabs
|
||||
vim.opt.showmode = false -- we don't need to see things like -- INSERT -- anymore
|
||||
vim.opt.showtabline = 0 -- disable tabs
|
||||
vim.opt.sidescrolloff = 8
|
||||
vim.opt.signcolumn = "auto" -- always show the sign column otherwise it would shift the text each time
|
||||
vim.opt.smartcase = true -- smart case
|
||||
vim.opt.signcolumn = "yes" -- always show the sign column otherwise it would shift the text each time
|
||||
vim.opt.smartcase = true -- smart case
|
||||
vim.opt.smartindent = true -- make indenting smarter again
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.spell = false
|
||||
vim.opt.spelloptions:append("camel")
|
||||
vim.opt.splitbelow = true -- force all horizontal splits to go below current window
|
||||
vim.opt.splitright = true -- force all vertical splits to go to the right of current window
|
||||
vim.opt.swapfile = false -- creates a swapfile
|
||||
vim.opt.tabstop = 4 -- insert 4 spaces for a tab
|
||||
vim.opt.splitbelow = true -- force all horizontal splits to go below current window
|
||||
vim.opt.splitright = true -- force all vertical splits to go to the right of current window
|
||||
vim.opt.swapfile = false -- creates a swapfile
|
||||
vim.opt.tabstop = 4 -- insert 4 spaces for a tab
|
||||
vim.opt.termguicolors = true -- set term gui colors (most terminals support this)
|
||||
vim.opt.timeoutlen = 250 -- time to wait for a mapped sequence to complete (in milliseconds)
|
||||
vim.opt.timeoutlen = 250 -- time to wait for a mapped sequence to complete (in milliseconds)
|
||||
vim.opt.undodir = vim.fn.stdpath("data") .. "/nvim/undodir"
|
||||
vim.opt.undofile = true -- enable persistent undo
|
||||
vim.opt.updatetime = 50 -- faster completion (4000ms default)
|
||||
vim.opt.undofile = true -- enable persistent undo
|
||||
vim.opt.updatetime = 50 -- faster completion (4000ms default)
|
||||
vim.opt.whichwrap:append("<,>,[,],h,l")
|
||||
vim.opt.wrap = false -- display lines as one long line
|
||||
vim.opt.writebackup = false -- if a file is being edited by another program (or was written to file while editing with another program) it is not allowed to be edit
|
||||
vim.opt.wrap = false -- display lines as one long line
|
||||
vim.opt.writebackup = false -- if a file is being edited by another program (or was written to file while editing with another program) it is not allowed to be edit
|
||||
vim.opt_local.path:prepend(vim.fn.stdpath("config") .. "/lua")
|
||||
vim.opt_local.suffixesadd:prepend(".lua")
|
||||
vim.opt_local.suffixesadd:prepend("init.lua")
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
return {
|
||||
"doctorfree/cheatsheet.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
{ "nvim-telescope/telescope.nvim" },
|
||||
{ "nvim-lua/popup.nvim" },
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
config = function()
|
||||
require("cheatsheet").setup({
|
||||
-- Whether to show bundled cheatsheets
|
||||
|
||||
-- For generic cheatsheets like default, unicode, nerd-fonts, etc
|
||||
bundled_cheatsheets = {
|
||||
enabled = { "default", "unicode", "regex", "markdown", "lua" },
|
||||
disabled = { "nerd-fonts" },
|
||||
},
|
||||
-- bundled_cheatsheets = true,
|
||||
|
||||
-- For plugin specific cheatsheets
|
||||
bundled_plugin_cheatsheets = {
|
||||
enabled = {},
|
||||
disabled = {},
|
||||
},
|
||||
-- bundled_plugin_cheatsheets = true,
|
||||
|
||||
-- For bundled plugin cheatsheets, do not show a sheet if you
|
||||
-- don't have the plugin installed (searches runtimepath for
|
||||
-- same directory name)
|
||||
include_only_installed_plugins = true,
|
||||
|
||||
-- Key mappings bound inside the telescope window
|
||||
telescope_mappings = {
|
||||
["<CR>"] = require("cheatsheet.telescope.actions").select_or_fill_commandline,
|
||||
["<A-CR>"] = require("cheatsheet.telescope.actions").select_or_execute,
|
||||
["<C-Y>"] = require("cheatsheet.telescope.actions").copy_cheat_value,
|
||||
["<C-E>"] = require("cheatsheet.telescope.actions").edit_user_cheatsheet,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
return {
|
||||
"wintermute-cell/gitignore.nvim",
|
||||
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||
dependencies = {},
|
||||
cmd = { "Gitignore" },
|
||||
keys = {
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
return {
|
||||
"barrett-ruth/http-codes.nvim",
|
||||
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||
dependencies = { "folke/snacks.nvim" },
|
||||
cmd = "HTTPCodes",
|
||||
keys = { { "<leader>pdh", vim.cmd.HTTPCodes, desc = "HTTP" } },
|
||||
config = true,
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ return {
|
||||
"mason-org/mason.nvim",
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
"saghen/blink.cmp",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"folke/snacks.nvim",
|
||||
"folke/trouble.nvim",
|
||||
"folke/neoconf.nvim",
|
||||
"mrcjkb/rustaceanvim",
|
||||
@@ -99,7 +99,7 @@ return {
|
||||
nmap("gr", function()
|
||||
trouble.toggle("lsp_references")
|
||||
end, "[G]oto [R]eferences")
|
||||
nmap("gR", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
|
||||
nmap("gR", function() Snacks.picker.lsp_references() end, "[G]oto [R]eferences")
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@ return {
|
||||
"NeogitOrg/neogit",
|
||||
version = "*",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim", -- required
|
||||
"sindrets/diffview.nvim", -- Diff integration
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"sindrets/diffview.nvim",
|
||||
"folke/snacks.nvim",
|
||||
},
|
||||
cmd = { "Neogit" },
|
||||
keys = {
|
||||
@@ -18,16 +18,7 @@ return {
|
||||
{ "<leader>gd", vim.cmd.DiffviewOpen, desc = "Git Diff" },
|
||||
},
|
||||
opts = {
|
||||
-- When enabled, will watch the `.git/` directory for changes and refresh the status buffer in response to filesystem
|
||||
-- events.
|
||||
filewatcher = {
|
||||
interval = 500,
|
||||
},
|
||||
-- Allows a different telescope sorter. Defaults to 'fuzzy_with_index_bias'. The example below will use the native fzf
|
||||
-- sorter instead. By default, this function returns `nil`.
|
||||
telescope_sorter = function()
|
||||
return require("telescope").extensions.fzf.native_fzf_sorter()
|
||||
end,
|
||||
filewatcher = { interval = 500 },
|
||||
-- Table of settings to never persist. Uses format "Filetype--cli-value"
|
||||
ignored_settings = {
|
||||
"NeogitPushPopup--force-with-lease",
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
return {
|
||||
"nvim-neorg/neorg",
|
||||
dependencies = {
|
||||
"nvim-neorg/neorg-telescope",
|
||||
},
|
||||
lazy = true,
|
||||
version = "*",
|
||||
ft = "norg",
|
||||
@@ -112,15 +109,6 @@ return {
|
||||
},
|
||||
},
|
||||
-- ["core.ui.calendar"] = {},
|
||||
["core.integrations.telescope"] = {
|
||||
config = {
|
||||
insert_file_link = {
|
||||
-- Whether to show the title preview in telescope. Affects performance with a large
|
||||
-- number of files.
|
||||
show_title_preview = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ return {
|
||||
event = "BufReadPre " .. vim.fn.expand("~") .. "/Obsidian/**/*.md",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"folke/snacks.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
keys = {
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
return {
|
||||
"nosduco/remote-sshfs.nvim",
|
||||
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
|
||||
opts = {},
|
||||
}
|
||||
@@ -3,6 +3,7 @@ return {
|
||||
dependencies = {
|
||||
{ "echasnovski/mini.icons", version = "*" },
|
||||
"stevearc/oil.nvim",
|
||||
"folke/trouble.nvim",
|
||||
},
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
@@ -39,7 +40,29 @@ return {
|
||||
lazygit = { enabled = false },
|
||||
notifier = { enabled = false },
|
||||
notify = { enabled = false },
|
||||
picker = { enabled = false },
|
||||
picker = {
|
||||
enabled = true,
|
||||
format = "file",
|
||||
layout = {
|
||||
preset = "telescope"
|
||||
},
|
||||
matcher = {
|
||||
frecency = true,
|
||||
sort_empty = true,
|
||||
cwd_bonus = true,
|
||||
},
|
||||
actions = require("trouble.sources.snacks").actions,
|
||||
win = {
|
||||
input = {
|
||||
keys = {
|
||||
["<C-t>"] = {
|
||||
"trouble_open",
|
||||
mode = { "n", "i" }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
profiler = { enabled = false },
|
||||
quickfile = { enabled = true, exclude = { "latex" } },
|
||||
rename = { enabled = true },
|
||||
@@ -92,6 +115,21 @@ return {
|
||||
end,
|
||||
desc = "Git Blame",
|
||||
},
|
||||
{
|
||||
"<C-n>", function() Snacks.picker.files() end, desc = "Find Files" },
|
||||
{ "<leader>pf", function() Snacks.picker.files() end, desc = "Find Files" },
|
||||
{ "<leader>ps", function() Snacks.picker.grep() end, desc = "Grep" },
|
||||
{ "<leader>pb", function() Snacks.picker.buffers() end, desc = "Buffers" },
|
||||
{ "<leader>pw", function() Snacks.picker.grep_word() end, desc = "Visual selection of word", mode = { "n", "x" } },
|
||||
{ "<leader>pi", function() Snacks.picker.icons() end, desc = "Icons", },
|
||||
{ "<leader>ph", function() Snacks.picker.help() end, desc = "Help Pages", },
|
||||
{ "<leader>pr", function() Snacks.picker.recent() end, desc = "Recent", },
|
||||
{ "<leader>pR", function() Snacks.picker.registers() end, desc = "Registers", },
|
||||
{ "<leader>pg", function() Snacks.picker.git_files() end, desc = "Find Git Fiels", },
|
||||
{ "<leader>pk", function() Snacks.picker.keymaps() end, desc = "Keymaps" },
|
||||
{ "<leader>pt", function() Snacks.picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" },
|
||||
{ "<leader>pc", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" },
|
||||
{ "<leader>pl", function() Snacks.picker.lazy() end, desc = "Search for Plugin Spec" },
|
||||
},
|
||||
init = function()
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
|
||||
@@ -1,279 +0,0 @@
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
version = "*",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||||
"nvim-telescope/telescope-media-files.nvim",
|
||||
"nvim-telescope/telescope-symbols.nvim",
|
||||
"nvim-telescope/telescope-bibtex.nvim",
|
||||
"tsakirist/telescope-lazy.nvim",
|
||||
"chip/telescope-software-licenses.nvim",
|
||||
"crispgm/telescope-heading.nvim",
|
||||
"benfowler/telescope-luasnip.nvim",
|
||||
"paopaol/telescope-git-diffs.nvim",
|
||||
{ "ThePrimeagen/harpoon", branch = "harpoon2" },
|
||||
"nvim-telescope/telescope-frecency.nvim",
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
"nosduco/remote-sshfs.nvim",
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<C-n>",
|
||||
require("telescope.builtin").git_files,
|
||||
desc = "Telescope git_files",
|
||||
},
|
||||
{
|
||||
"<leader>pf",
|
||||
require("telescope.builtin").find_files,
|
||||
desc = "Files",
|
||||
},
|
||||
{
|
||||
"<leader>/",
|
||||
function()
|
||||
require("telescope.builtin").current_buffer_fuzzy_find(
|
||||
require("telescope.themes").get_dropdown({ previewer = false })
|
||||
)
|
||||
end,
|
||||
desc = "Current Buffer Fuzzy",
|
||||
},
|
||||
{ "<leader>ps", require("telescope.builtin").live_grep, desc = "Live Grep" },
|
||||
{ "<leader>pb", require("telescope.builtin").buffers, desc = "Find Buffers" },
|
||||
{ "<leader>pws", require("telescope.builtin").grep_string, desc = "String under the cursor" },
|
||||
{ "<leader>pe", require("telescope.builtin").symbols, desc = "Emoji" },
|
||||
{ "<leader>pd", require("telescope.builtin").diagnostic, desc = "Diagnostics" },
|
||||
{ "<leader>pB", require("telescope.builtin").git_branches, desc = "Checkout Branch" },
|
||||
{ "<leader>ph", require("telescope.builtin").help_tags, desc = "Help" },
|
||||
{ "<leader>pM", require("telescope.builtin").man_pages, desc = "Man Pages" },
|
||||
{ "<leader>pr", require("telescope.builtin").oldfiles, desc = "Open Recent Files" },
|
||||
{ "<leader>pR", require("telescope.builtin").registers, desc = "Registers" },
|
||||
{ "<leader>pg", require("telescope.builtin").git_files, desc = "Git Files" },
|
||||
{ "<leader>pk", require("telescope.builtin").keymaps, desc = "Keymaps" },
|
||||
{ "<leader>pC", require("telescope.builtin").commands, desc = "Commands" },
|
||||
{ "<leader>pt", vim.cmd.TodoTelescope, desc = "Todo" },
|
||||
{
|
||||
"<leader>pm",
|
||||
function()
|
||||
require("telescope").extensions.media_files.media_files()
|
||||
end,
|
||||
desc = "Media",
|
||||
},
|
||||
{
|
||||
"<leader>pc",
|
||||
function()
|
||||
require("telescope.builtin").colorscheme({ enable_preview = true })
|
||||
end,
|
||||
desc = "Colorscheme with Preview",
|
||||
},
|
||||
{
|
||||
"<leader>pl",
|
||||
function()
|
||||
require("telescope").extensions.lazy.lazy()
|
||||
end,
|
||||
desc = "Lazy",
|
||||
},
|
||||
{
|
||||
"<leader>pL",
|
||||
function()
|
||||
require("telescope").extensions.luasnip.luasnip()
|
||||
end,
|
||||
desc = "Luasnip",
|
||||
},
|
||||
{
|
||||
"<leader>pH",
|
||||
function()
|
||||
require("telescope").extensions.heading.heading()
|
||||
end,
|
||||
desc = "Heading",
|
||||
},
|
||||
{
|
||||
"<leader>pds",
|
||||
"<cmd>Telescope software-licenses find<cr>",
|
||||
desc = "Software Licenses",
|
||||
},
|
||||
{
|
||||
"<leader>pD",
|
||||
function()
|
||||
require("telescope").extensions.git_diffs.diff_commits()
|
||||
end,
|
||||
desc = "Git Diff Telescope",
|
||||
},
|
||||
{
|
||||
"<leader>tB",
|
||||
require("telescope.builtin").bibtex,
|
||||
desc = "Telescope Bibtex",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
defaults = {
|
||||
vimgrep_arguments = {
|
||||
"rg",
|
||||
"--color=never",
|
||||
"--no-heading",
|
||||
"--with-filename",
|
||||
"--line-number",
|
||||
"--column",
|
||||
"--smart-case",
|
||||
"--hidden",
|
||||
},
|
||||
prompt_prefix = " ",
|
||||
selection_caret = " ",
|
||||
path_display = { "smart" },
|
||||
file_ignore_patterns = { ".git/", ".spl", "target/", "*.pdf" },
|
||||
mappings = {
|
||||
i = {
|
||||
["<Down>"] = require("telescope.actions").cycle_history_next,
|
||||
["<Up>"] = require("telescope.actions").cycle_history_prev,
|
||||
["<C-j>"] = require("telescope.actions").move_selection_next,
|
||||
["<C-k>"] = require("telescope.actions").move_selection_previous,
|
||||
["<C-D>"] = require("telescope.actions").delete_buffer + require("telescope.actions").move_to_top,
|
||||
["<C-t>"] = require("trouble.sources.telescope").open,
|
||||
-- ["<C-Y>"] = require("telescope.actions").remove_selection
|
||||
},
|
||||
n = { ["<C-t>"] = require("trouble.sources.telescope").open },
|
||||
},
|
||||
history = {
|
||||
path = "~/.local/share/nvim/databases/telescope_history.sqlite3",
|
||||
limit = 100,
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
hidden = true,
|
||||
follow = true,
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
fzf = {
|
||||
fuzzy = true, -- false will only do exact matching
|
||||
override_generic_sorter = true, -- override the generic sorter
|
||||
override_file_sorter = true, -- override the file sorter
|
||||
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
|
||||
},
|
||||
media_files = {
|
||||
-- filetypes whitelist
|
||||
filetypes = { "png", "webp", "jpg", "jpeg", "mp4", "webm" },
|
||||
find_cmd = "rg",
|
||||
},
|
||||
emoji = {
|
||||
action = function(emoji)
|
||||
-- argument emoji is a table.
|
||||
-- {name="", value="", cagegory="", description=""}
|
||||
|
||||
vim.fn.setreg("*", emoji.value)
|
||||
print([[Press p or "*p to paste this emoji]] .. emoji.value)
|
||||
|
||||
-- insert emoji when picked
|
||||
-- vim.api.nvim_put({ emoji.value }, 'c', false, true)
|
||||
end,
|
||||
},
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown({
|
||||
-- even more opts
|
||||
}),
|
||||
|
||||
-- pseudo code / specification for writing custom displays, like the one
|
||||
-- for "codeactions"
|
||||
-- specific_opts = {
|
||||
-- [kind] = {
|
||||
-- make_indexed = function(items) -> indexed_items, width,
|
||||
-- make_displayer = function(widths) -> displayer
|
||||
-- make_display = function(displayer) -> function(e)
|
||||
-- make_ordinal = function(e) -> string
|
||||
-- },
|
||||
-- -- for example to disable the custom builtin "codeactions" display
|
||||
-- do the following
|
||||
-- codeactions = false,
|
||||
-- }
|
||||
},
|
||||
lazy = {
|
||||
-- Optional theme (the extension doesn't set a default theme)
|
||||
theme = "dropdown",
|
||||
previewer = false,
|
||||
-- Whether or not to show the icon in the first column
|
||||
show_icon = true,
|
||||
-- Mappings for the actions
|
||||
mappings = {
|
||||
open_in_browser = "<C-o>",
|
||||
open_in_file_browser = "<M-b>",
|
||||
open_in_find_files = "<C-f>",
|
||||
open_in_live_grep = "<C-g>",
|
||||
open_plugins_picker = "<C-b>", -- Works only after having called first another action
|
||||
open_lazy_root_find_files = "<C-r>f",
|
||||
open_lazy_root_live_grep = "<C-r>g",
|
||||
},
|
||||
-- Other telescope configuration options
|
||||
},
|
||||
http = {
|
||||
-- How the mozilla url is opened. By default will be configured based on OS:
|
||||
open_url = "xdg-open %s", -- UNIX
|
||||
-- open_url = 'open %s' -- OSX
|
||||
-- open_url = 'start %s' -- Windows
|
||||
},
|
||||
heading = {
|
||||
treesitter = true,
|
||||
picker_opts = {
|
||||
layout_config = { width = 0.8, preview_width = 0.5 },
|
||||
layout_strategy = "horizontal",
|
||||
},
|
||||
},
|
||||
bibtex = {
|
||||
-- Depth for the *.bib file
|
||||
depth = 1,
|
||||
-- Custom format for citation label
|
||||
custom_formats = {},
|
||||
-- Format to use for citation label.
|
||||
-- Try to match the filetype by default, or use 'plain'
|
||||
format = "",
|
||||
-- Path to global bibliographies (placed outside of the project)
|
||||
global_files = {},
|
||||
-- Define the search keys to use in the picker
|
||||
search_keys = { "author", "year", "title" },
|
||||
-- Template for the formatted citation
|
||||
citation_format = "{{author}} ({{year}}), {{title}}.",
|
||||
-- Only use initials for the authors first name
|
||||
citation_trim_firstname = true,
|
||||
-- Max number of authors to write in the formatted citation
|
||||
-- following authors will be replaced by "et al."
|
||||
citation_max_auth = 2,
|
||||
-- Context awareness disabled by default
|
||||
context = false,
|
||||
-- Fallback to global/directory .bib files if context not found
|
||||
-- This setting has no effect if context = false
|
||||
context_fallback = true,
|
||||
-- Wrapping in the preview window is disabled by default
|
||||
wrap = false,
|
||||
},
|
||||
frecency = {
|
||||
path_display = { "short" },
|
||||
ignore_patterns = { "*/.git/*", "*/.DS_Store/*", "*/.venv/*", "*/tmp/*", "*/bruno/*" },
|
||||
default_workspace = "CWD",
|
||||
hide_current_buffer = true,
|
||||
show_scores = true,
|
||||
},
|
||||
package_info = {
|
||||
-- Optional theme (the extension doesn't set a default theme)
|
||||
theme = "ivy",
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local telescope = require("telescope")
|
||||
|
||||
telescope.setup(opts)
|
||||
|
||||
pcall(telescope.load_extension, "fzf")
|
||||
pcall(telescope.load_extension, "ui-select")
|
||||
pcall(telescope.load_extension, "media_files") -- Telescope media_files
|
||||
pcall(telescope.load_extension, "lazy") -- Telescope lazy
|
||||
pcall(telescope.load_extension, "software-licenses") -- Telescope software-licenses list
|
||||
pcall(telescope.load_extension, "heading") -- Telescope heading
|
||||
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, "harpoon")
|
||||
pcall(telescope.load_extension, "frecency")
|
||||
pcall(telescope.load_extension, "remote-sshfs")
|
||||
end,
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
-- Action Keymap Description
|
||||
-- insert_log_below glj Insert a log statement below the cursor
|
||||
-- insert_log_above glk Insert a log statement above the cursor
|
||||
-- insert_plain_log_below glo Insert a plain log statement below the cursor
|
||||
-- insert_plain_log_above gl<S-o> Insert a plain log statement above the cursor
|
||||
-- add_log_targets_to_batch gla Add a log target to the batch
|
||||
-- insert_batch_log glb Insert a batch log statement
|
||||
return {
|
||||
"Goose97/timber.nvim",
|
||||
version = "*",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
opts = {
|
||||
log_templates = {
|
||||
default = {
|
||||
python = [[logger.debug(f"{%log_target=}")]],
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("timber").setup(opts)
|
||||
end,
|
||||
}
|
||||
@@ -3,8 +3,8 @@ return {
|
||||
build = ":TSUpdate",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
"kristoferssolo/tree-sitter-bruno",
|
||||
"OXY2DEV/markview.nvim",
|
||||
{
|
||||
@@ -52,10 +52,10 @@ return {
|
||||
incremenral_selection = {
|
||||
enable = false,
|
||||
keymaps = {
|
||||
init_selection = "<C-leader>",
|
||||
node_selection = "<C-space>",
|
||||
scope_selection = "<C-space>",
|
||||
node_deselection = "<C-backspace>",
|
||||
init_selection = "<A-o>",
|
||||
node_selection = "<A-o>",
|
||||
scope_selection = "<A-O>",
|
||||
node_deselection = "<A-i>",
|
||||
},
|
||||
},
|
||||
textobjects = {
|
||||
|
||||
@@ -31,7 +31,7 @@ return {
|
||||
desc = "substitute word",
|
||||
},
|
||||
{
|
||||
{ "<leader>c", vim.cmd.bdelete, desc = "Close Buffer" },
|
||||
{ "<leader>c", vim.cmd.bdelete, desc = "Close Buffer" },
|
||||
{
|
||||
"<leader>X",
|
||||
function()
|
||||
@@ -44,7 +44,7 @@ return {
|
||||
{ "<leader>q", group = "Persistence" },
|
||||
{ "<leader>l", group = "LSP" },
|
||||
{ "<leader>w", group = "Workspace" },
|
||||
{ "<leader>p", group = "Telescope", { "<leader>pd", group = "Development" } },
|
||||
{ "<leader>f", group = "Picker", { "<leader>pd", group = "Development" } },
|
||||
{ "<leader>z", group = "Zen" },
|
||||
{ "<leader>o", group = "Action" },
|
||||
{ "<leader>r", group = "Rust" },
|
||||
@@ -67,13 +67,13 @@ return {
|
||||
{
|
||||
"<leader>L",
|
||||
group = "Languate settings",
|
||||
{ "<leader>Lc", "<cmd>setlocal formatoptions-=cro<cr>", desc = "Disable autocomment" },
|
||||
{ "<leader>LC", "<cmd>setlocal formatoptions=cro<cr>", desc = "Enable autocomment" },
|
||||
{ "<leader>Ls", "<cmd>setlocal spell!<cr>", desc = "Toggle spellchecker" },
|
||||
{ "<leader>Lc", "<cmd>setlocal formatoptions-=cro<cr>", desc = "Disable autocomment" },
|
||||
{ "<leader>LC", "<cmd>setlocal formatoptions=cro<cr>", desc = "Enable autocomment" },
|
||||
{ "<leader>Ls", "<cmd>setlocal spell!<cr>", desc = "Toggle spellchecker" },
|
||||
{ "<leader>Le", "<cmd>setlocal spell spelllang=en_us<cr>", desc = "Enable English spellchecker" },
|
||||
{ "<leader>Ll", "<cmd>setlocal spell spelllang=lv_LV<cr>", desc = "Enable Latvian spellchecker" },
|
||||
{ "<leader>LI", "<cmd>setlocal autoindent<cr>", desc = "Enable autoindent" },
|
||||
{ "<leader>Li", "<cmd>setlocal noautoindent<cr>", desc = "Disable autoindent" },
|
||||
{ "<leader>LI", "<cmd>setlocal autoindent<cr>", desc = "Enable autoindent" },
|
||||
{ "<leader>Li", "<cmd>setlocal noautoindent<cr>", desc = "Disable autoindent" },
|
||||
},
|
||||
--[[ {
|
||||
"<leader>P",
|
||||
|
||||
Reference in New Issue
Block a user