Merge branch 'master' into laptop
This commit is contained in:
commit
7b7fee3466
|
@ -56,6 +56,11 @@ key = "E"
|
|||
mode = "Vi"
|
||||
mods = "Control"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
key = "F"
|
||||
mods = "Control|Shift"
|
||||
action = "ReceiveChar"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[72;6u"
|
||||
key = "H"
|
||||
|
|
|
@ -11,4 +11,9 @@ if not vim.loop.fs_stat(lazypath) then
|
|||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
require("lazy").setup("plugins")
|
||||
require("lazy").setup("plugins", {
|
||||
change_detection = {
|
||||
enabled = false,
|
||||
notify = false, -- get a notification when changes are found
|
||||
}
|
||||
})
|
||||
|
|
|
@ -6,7 +6,6 @@ return {
|
|||
integrations = {
|
||||
mason = true,
|
||||
lsp_trouble = true,
|
||||
vimwiki = true
|
||||
},
|
||||
custom_highlights = function(colors)
|
||||
return {
|
||||
|
@ -14,7 +13,7 @@ return {
|
|||
TelescopeBorder = { bg = "#191926", fg = "#191926" },
|
||||
TelescopePromptBorder = { bg = "#191926", fg = "#191926" },
|
||||
TelescopeTitle = { fg = colors.blue },
|
||||
WinSeparator = { fg = "#023269" }
|
||||
WinSeparator = { fg = "#023269" },
|
||||
}
|
||||
end,
|
||||
color_overrides = {
|
||||
|
|
|
@ -21,17 +21,24 @@ return {
|
|||
workspaces = {
|
||||
{
|
||||
name = "Lumentis",
|
||||
path = "~/Workspace/DnD/Lumentis Campaign Setting/",
|
||||
path = "~/Workspace/DnD/Lumentis/",
|
||||
},
|
||||
},
|
||||
disable_frontmatter = true,
|
||||
disable_frontmatter = true,
|
||||
ui = {
|
||||
hl_groups = {
|
||||
ObsidianRefText = { fg = "#61afef" },
|
||||
}
|
||||
}
|
||||
},
|
||||
keys = {
|
||||
{"<cr>", handle_enter, ft = "markdown" },
|
||||
{"<cr>", ":ObsidianLink<cr>", ft = "markdown", mode = "v"},
|
||||
{"gd", handle_enter, ft = "markdown" },
|
||||
{"<leader>rn", ":ObsidianRename<cr>", ft = "markdown" },
|
||||
{"<tab>", ":set nohlsearch<cr>/\\[[^\\[\\]]*\\]([^()]*)<cr>:let @/ = \"\"<cr>:set hlsearch<cr>", ft = "markdown", silent = true },
|
||||
},
|
||||
detect_cwd = true,
|
||||
config = function (_, opts)
|
||||
require("obsidian").setup(opts)
|
||||
end
|
||||
}
|
||||
|
|
|
@ -55,6 +55,7 @@ return {
|
|||
keys = {
|
||||
{ "<leader>u", require("telescope").extensions.undo.undo},
|
||||
{ "<C-Space>", require("telescope.builtin").oldfiles},
|
||||
{ "<C-f>", function () require"telescope.builtin".live_grep({ path_display = { 'smart' }, }) end},
|
||||
{ "<C-p>", function () -- git files
|
||||
local opts = require('telescope.themes').get_ivy({})
|
||||
opts["show_untracked"] = true
|
||||
|
@ -73,7 +74,7 @@ return {
|
|||
opts["layout_config"] = {height=0.2}
|
||||
require"telescope.builtin".buffers(opts)
|
||||
end},
|
||||
{ "<C-f>", function () -- fuzzy search
|
||||
{ "<C-S-f>", function () -- fuzzy search
|
||||
require"telescope.builtin".grep_string({
|
||||
path_display = { 'smart' },
|
||||
only_sort_text = true,
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
return {}
|
||||
-- local pickers = require("telescope.pickers")
|
||||
-- local actions = require "telescope.actions"
|
||||
-- local action_state = require("telescope.actions.state")
|
||||
-- local finders = require("telescope.finders")
|
||||
-- local conf = require("telescope.config").values
|
||||
--
|
||||
-- local root_path = '/home/user/Workspace/DnD/Lumentis Campaign Setting'
|
||||
--
|
||||
-- local function get_title(file)
|
||||
-- for line in io.lines(file) do
|
||||
-- line = string.gsub(line, "#", "")
|
||||
-- line = string.gsub(line, "^%s*", "")
|
||||
-- line = string.gsub(line, "%s*$", "")
|
||||
-- return line
|
||||
-- end
|
||||
-- end
|
||||
--
|
||||
-- local function choose_link(opts, titles, links)
|
||||
-- opts = opts or {}
|
||||
-- pickers.new(opts, {
|
||||
-- prompt_title = "Choose a file",
|
||||
-- finder = finders.new_table {
|
||||
-- results = titles
|
||||
-- },
|
||||
-- sorter = conf.generic_sorter(opts),
|
||||
-- attach_mappings = function(prompt_bufnr, _)
|
||||
-- actions.select_default:replace(function()
|
||||
-- actions.close(prompt_bufnr)
|
||||
-- local selection = action_state.get_selected_entry()
|
||||
-- vim.api.nvim_put({ links[selection['index']] }, "", false, true)
|
||||
-- end)
|
||||
-- return true
|
||||
-- end,
|
||||
-- }):find()
|
||||
-- end
|
||||
--
|
||||
-- local function insert_link()
|
||||
-- local scan = require("plenary.scandir").scan_dir(root_path)
|
||||
-- local titles = {}
|
||||
-- local links = {}
|
||||
-- for _, v in ipairs(scan) do
|
||||
-- if v:match("^.+(%..+)$") == ".md" then
|
||||
-- local absolute_filename = string.sub(v, root_path:len()+1, v:len())
|
||||
-- local title = get_title(v)
|
||||
-- if title:len() > 0 then
|
||||
-- local link = "[" .. title .. "](" .. absolute_filename .. ")"
|
||||
-- table.insert(titles, title)
|
||||
-- table.insert(links, link)
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- choose_link(require("telescope.themes").get_dropdown{}, titles, links)
|
||||
-- end
|
||||
--
|
||||
-- return {
|
||||
-- 'vimwiki/vimwiki',
|
||||
-- dependencies = {'nvim-lua/plenary.nvim', 'nvim-telescope/telescope.nvim'},
|
||||
-- init = function ()
|
||||
-- vim.g.vimwiki_list = {{path = '~/Workspace/DnD/Lumentis Campaign Setting/', syntax = 'markdown', ext = '.md'}}
|
||||
-- vim.g.vimwiki_key_mappings = { table_mappings = 0 }
|
||||
-- vim.g.vimwiki_markdown_link_ext = 1
|
||||
-- vim.g.vimwiki_global_ext = 0
|
||||
-- end,
|
||||
-- lazy = false,
|
||||
-- keys = {
|
||||
-- {"<leader>l", insert_link},
|
||||
-- {"<leader>l", insert_link, mode="i"}
|
||||
-- }
|
||||
-- }
|
|
@ -38,7 +38,7 @@ vim.g.rooter_patterns = {".git", "Makefile", "CMakeLists.txt", "build/", "meson.
|
|||
vim.g.rooter_silent_chdir = 1
|
||||
vim.opt.shada = "!,'2000,f1,<50,s10,h"
|
||||
vim.o.updatetime = 250
|
||||
vim.opt.conceallevel = 1
|
||||
vim.opt.conceallevel = 2
|
||||
|
||||
-- Vimtex
|
||||
vim.g.tex_flavor = 'latex'
|
||||
|
|
Loading…
Reference in New Issue