Compare commits
No commits in common. "ecab00e9cd1120ba9d45820f9262215841f7f804" and "038dc6f99e75e9bd8e1bc59a925148d07ea02807" have entirely different histories.
ecab00e9cd
...
038dc6f99e
|
@ -18,9 +18,7 @@ Checks: "*,
|
||||||
-cppcoreguidelines-avoid-magic-numbers
|
-cppcoreguidelines-avoid-magic-numbers
|
||||||
-Wsign-compare
|
-Wsign-compare
|
||||||
-hicpp-uppercase-literal-suffix
|
-hicpp-uppercase-literal-suffix
|
||||||
-readability-uppercase-literal-suffix
|
-readability-uppercase-literal-suffix"
|
||||||
-readability-named-parameter
|
|
||||||
-performance-avoid-endl"
|
|
||||||
WarningsAsErrors: ''
|
WarningsAsErrors: ''
|
||||||
HeaderFilterRegex: ''
|
HeaderFilterRegex: ''
|
||||||
FormatStyle: none
|
FormatStyle: none
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "59e65d88db177ad1e6a8cffaafd4738420ad20b6" },
|
"nvim-tree.lua": { "branch": "master", "commit": "59e65d88db177ad1e6a8cffaafd4738420ad20b6" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "07c8c3d84f67b1530f636dcad31971f569a3df5f" },
|
"nvim-treesitter": { "branch": "master", "commit": "07c8c3d84f67b1530f636dcad31971f569a3df5f" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "140edfcf25093e8b321d13e154cbce89ee868ca0" },
|
"nvim-web-devicons": { "branch": "master", "commit": "140edfcf25093e8b321d13e154cbce89ee868ca0" },
|
||||||
"obsidian.nvim": { "branch": "main", "commit": "e2d6ce7b07941b0788177e1297699ad99c1470dc" },
|
|
||||||
"oil.nvim": { "branch": "master", "commit": "dd432e76d01eda08b8658415588d011009478469" },
|
"oil.nvim": { "branch": "master", "commit": "dd432e76d01eda08b8658415588d011009478469" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
|
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
|
||||||
"sqlite.lua": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" },
|
"sqlite.lua": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" },
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
local function open_link()
|
|
||||||
local util = require("obsidian.util")
|
|
||||||
if util.cursor_on_markdown_link(nil, nil, true) then
|
|
||||||
vim.cmd("ObsidianFollowLink")
|
|
||||||
else
|
|
||||||
util.toggle_checkbox()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
"epwalsh/obsidian.nvim",
|
|
||||||
version = "*", -- recommended, use latest release instead of latest commit
|
|
||||||
ft = "markdown",
|
|
||||||
-- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault:
|
|
||||||
-- event = {
|
|
||||||
-- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
|
|
||||||
-- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md"
|
|
||||||
-- "BufReadPre path/to/my-vault/**.md",
|
|
||||||
-- "BufNewFile path/to/my-vault/**.md",
|
|
||||||
-- },
|
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
|
||||||
opts = {
|
|
||||||
workspaces = {
|
|
||||||
{
|
|
||||||
name = "Lumentis",
|
|
||||||
path = "~/Workspace/DnD/Lumentis Campaign Setting/",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
disable_frontmatter = true,
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{"<cr>", open_link, ft = "markdown" },
|
|
||||||
{"gd", open_link, ft = "markdown" },
|
|
||||||
{"<leader>rn", ":ObsidianRename<cr>"},
|
|
||||||
},
|
|
||||||
detect_cwd = true,
|
|
||||||
}
|
|
|
@ -3,7 +3,7 @@ return {
|
||||||
dependencies = {'luckasRanarison/tree-sitter-hypr'},
|
dependencies = {'luckasRanarison/tree-sitter-hypr'},
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = { "cpp", "c", "lua", "vim", "dockerfile", "python", "java", "cmake", "diff", "gitcommit", "html", "css", "javascript", "json", "rust", "sql", "yaml", "markdown", "markdown_inline" },
|
ensure_installed = { "cpp", "c", "lua", "vim", "dockerfile", "python", "java", "cmake", "diff", "gitcommit", "html", "css", "javascript", "json", "rust", "sql", "yaml" },
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
|
|
@ -1,70 +1,69 @@
|
||||||
return {}
|
local pickers = require("telescope.pickers")
|
||||||
-- local pickers = require("telescope.pickers")
|
local actions = require "telescope.actions"
|
||||||
-- local actions = require "telescope.actions"
|
local action_state = require("telescope.actions.state")
|
||||||
-- local action_state = require("telescope.actions.state")
|
local finders = require("telescope.finders")
|
||||||
-- local finders = require("telescope.finders")
|
local conf = require("telescope.config").values
|
||||||
-- local conf = require("telescope.config").values
|
|
||||||
--
|
local root_path = '/home/user/Workspace/DnD/Lumentis Campaign Setting'
|
||||||
-- local root_path = '/home/user/Workspace/DnD/Lumentis Campaign Setting'
|
|
||||||
--
|
local function get_title(file)
|
||||||
-- local function get_title(file)
|
for line in io.lines(file) do
|
||||||
-- for line in io.lines(file) do
|
line = string.gsub(line, "#", "")
|
||||||
-- line = string.gsub(line, "#", "")
|
line = string.gsub(line, "^%s*", "")
|
||||||
-- line = string.gsub(line, "^%s*", "")
|
line = string.gsub(line, "%s*$", "")
|
||||||
-- line = string.gsub(line, "%s*$", "")
|
return line
|
||||||
-- return line
|
end
|
||||||
-- end
|
end
|
||||||
-- end
|
|
||||||
--
|
local function choose_link(opts, titles, links)
|
||||||
-- local function choose_link(opts, titles, links)
|
opts = opts or {}
|
||||||
-- opts = opts or {}
|
pickers.new(opts, {
|
||||||
-- pickers.new(opts, {
|
prompt_title = "Choose a file",
|
||||||
-- prompt_title = "Choose a file",
|
finder = finders.new_table {
|
||||||
-- finder = finders.new_table {
|
results = titles
|
||||||
-- results = titles
|
},
|
||||||
-- },
|
sorter = conf.generic_sorter(opts),
|
||||||
-- sorter = conf.generic_sorter(opts),
|
attach_mappings = function(prompt_bufnr, _)
|
||||||
-- attach_mappings = function(prompt_bufnr, _)
|
actions.select_default:replace(function()
|
||||||
-- actions.select_default:replace(function()
|
actions.close(prompt_bufnr)
|
||||||
-- actions.close(prompt_bufnr)
|
local selection = action_state.get_selected_entry()
|
||||||
-- local selection = action_state.get_selected_entry()
|
vim.api.nvim_put({ links[selection['index']] }, "", false, true)
|
||||||
-- vim.api.nvim_put({ links[selection['index']] }, "", false, true)
|
end)
|
||||||
-- end)
|
return true
|
||||||
-- return true
|
end,
|
||||||
-- end,
|
}):find()
|
||||||
-- }):find()
|
end
|
||||||
-- end
|
|
||||||
--
|
local function insert_link()
|
||||||
-- local function insert_link()
|
local scan = require("plenary.scandir").scan_dir(root_path)
|
||||||
-- local scan = require("plenary.scandir").scan_dir(root_path)
|
local titles = {}
|
||||||
-- local titles = {}
|
local links = {}
|
||||||
-- local links = {}
|
for _, v in ipairs(scan) do
|
||||||
-- for _, v in ipairs(scan) do
|
if v:match("^.+(%..+)$") == ".md" then
|
||||||
-- if v:match("^.+(%..+)$") == ".md" then
|
local absolute_filename = string.sub(v, root_path:len()+1, v:len())
|
||||||
-- local absolute_filename = string.sub(v, root_path:len()+1, v:len())
|
local title = get_title(v)
|
||||||
-- local title = get_title(v)
|
if title:len() > 0 then
|
||||||
-- if title:len() > 0 then
|
local link = "[" .. title .. "](" .. absolute_filename .. ")"
|
||||||
-- local link = "[" .. title .. "](" .. absolute_filename .. ")"
|
table.insert(titles, title)
|
||||||
-- table.insert(titles, title)
|
table.insert(links, link)
|
||||||
-- table.insert(links, link)
|
end
|
||||||
-- end
|
end
|
||||||
-- end
|
end
|
||||||
-- end
|
choose_link(require("telescope.themes").get_dropdown{}, titles, links)
|
||||||
-- choose_link(require("telescope.themes").get_dropdown{}, titles, links)
|
end
|
||||||
-- end
|
|
||||||
--
|
return {
|
||||||
-- return {
|
'vimwiki/vimwiki',
|
||||||
-- 'vimwiki/vimwiki',
|
dependencies = {'nvim-lua/plenary.nvim', 'nvim-telescope/telescope.nvim'},
|
||||||
-- dependencies = {'nvim-lua/plenary.nvim', 'nvim-telescope/telescope.nvim'},
|
init = function ()
|
||||||
-- init = function ()
|
vim.g.vimwiki_list = {{path = '~/Workspace/DnD/Lumentis Campaign Setting/', syntax = 'markdown', ext = '.md'}}
|
||||||
-- 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_key_mappings = { table_mappings = 0 }
|
vim.g.vimwiki_markdown_link_ext = 1
|
||||||
-- vim.g.vimwiki_markdown_link_ext = 1
|
vim.g.vimwiki_global_ext = 0
|
||||||
-- vim.g.vimwiki_global_ext = 0
|
end,
|
||||||
-- end,
|
lazy = false,
|
||||||
-- lazy = false,
|
keys = {
|
||||||
-- keys = {
|
{"<leader>l", insert_link},
|
||||||
-- {"<leader>l", insert_link},
|
{"<leader>l", insert_link, mode="i"}
|
||||||
-- {"<leader>l", insert_link, mode="i"}
|
}
|
||||||
-- }
|
}
|
||||||
-- }
|
|
||||||
|
|
|
@ -38,7 +38,6 @@ vim.g.rooter_patterns = {".git", "Makefile", "CMakeLists.txt", "build/", "meson.
|
||||||
vim.g.rooter_silent_chdir = 1
|
vim.g.rooter_silent_chdir = 1
|
||||||
vim.opt.shada = "!,'2000,f1,<50,s10,h"
|
vim.opt.shada = "!,'2000,f1,<50,s10,h"
|
||||||
vim.o.updatetime = 250
|
vim.o.updatetime = 250
|
||||||
vim.opt.conceallevel = 1
|
|
||||||
|
|
||||||
-- Vimtex
|
-- Vimtex
|
||||||
vim.g.tex_flavor = 'latex'
|
vim.g.tex_flavor = 'latex'
|
||||||
|
|
Loading…
Reference in New Issue