mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
feat(nvim): Markdown handling improvements
- marksman: Trimmed config file: removed comments, remove default settings - fix: ftplugin for codelens: provide current buffer - new: Add obsidian.nvim plugin to replace markdown-oxide lsp
This commit is contained in:
@@ -1,36 +1,15 @@
|
|||||||
[core]
|
[core]
|
||||||
|
|
||||||
markdown.file_extensions = ["md", "markdown"]
|
markdown.file_extensions = ["md", "markdown"]
|
||||||
# Configures text sync protocol between the editor (LSP client)
|
text_sync = "full"
|
||||||
# and Marksman (LSP server).
|
title_from_heading = true
|
||||||
# Can be either 'full' or `incremental`:
|
incremental_references = false
|
||||||
# * full: the whole copy of a document is sent by the editor
|
|
||||||
# on every update,
|
|
||||||
# * incremental: only the changed parts are sent by
|
|
||||||
# the editor. This will result in less trafic between
|
|
||||||
# the editor and Marksman, but the overall performance
|
|
||||||
# impact is marginal.
|
|
||||||
# Defaults to `full` because the editors have bugs in incremental
|
|
||||||
# sync which result in slightly correpted state and are really hard
|
|
||||||
# to diagnose.
|
|
||||||
text_sync = "incremental"
|
|
||||||
# Use incremental resolution of project-wide references.
|
|
||||||
# This is much more efficient but is currently experimental
|
|
||||||
incremental_references = true
|
|
||||||
# For debugging only! Enables extra validation checks around
|
|
||||||
# incremental state updates. SIGNIFICANTLY IMPACTS PERFORMANCE
|
|
||||||
paranoid = false
|
paranoid = false
|
||||||
|
|
||||||
[code_action]
|
[code_action]
|
||||||
# Enable/disable "Table of Contents" code action
|
|
||||||
toc.enable = true
|
toc.enable = true
|
||||||
|
|
||||||
# Enable/disable "Create missing linked file" code action
|
|
||||||
create_missing_file.enable = false
|
create_missing_file.enable = false
|
||||||
|
|
||||||
[completion]
|
[completion]
|
||||||
# The style of wiki links completion.
|
candidates = 50
|
||||||
# Other values include:
|
wiki.style = "file-path-stem"
|
||||||
# * "file-stem" to complete using file name without an extension,
|
|
||||||
# * "file-path-stem" same as above but using file path.
|
|
||||||
wiki.style = "title-slug"
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ local function check_codelens_support()
|
|||||||
end
|
end
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ "TextChanged", "InsertLeave", "CursorHold", "LspAttach", "BufEnter" }, {
|
vim.api.nvim_create_autocmd({ "TextChanged", "InsertLeave", "CursorHold", "LspAttach", "BufEnter" }, {
|
||||||
buffer = bufnr,
|
buffer = vim.api.nvim_get_current_buf(),
|
||||||
callback = function()
|
callback = function()
|
||||||
if check_codelens_support() then
|
if check_codelens_support() then
|
||||||
vim.lsp.codelens.refresh({ bufnr = 0 })
|
vim.lsp.codelens.refresh({ bufnr = 0 })
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
return {
|
|
||||||
cmd = { "markdown-oxide" },
|
|
||||||
filetypes = { "markdown" },
|
|
||||||
root_dir = function()
|
|
||||||
return vim.fn.getcwd()
|
|
||||||
end,
|
|
||||||
settings = {
|
|
||||||
workspace = {
|
|
||||||
didChangeWatchedFiles = {
|
|
||||||
dynamicRegistration = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -69,6 +69,30 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"obsidian-nvim/obsidian.nvim",
|
||||||
|
version = "*",
|
||||||
|
enabled = true,
|
||||||
|
opts = {
|
||||||
|
workspaces = {
|
||||||
|
{
|
||||||
|
name = "personal",
|
||||||
|
path = "~/Code/Notes",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
completions = {
|
||||||
|
blink = true,
|
||||||
|
nvim_cmp = false,
|
||||||
|
},
|
||||||
|
comment = { enabled = true },
|
||||||
|
attachments = { img_folder = ".artifacts/img" },
|
||||||
|
footer = { format = "{{backlinks}} backlinks" },
|
||||||
|
legacy_commands = false,
|
||||||
|
ui = { enable = false },
|
||||||
|
frontmatter = { enabled = false },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"bullets-vim/bullets.vim",
|
"bullets-vim/bullets.vim",
|
||||||
ft = { "markdown", "text", "gitcommit", "scratch" },
|
ft = { "markdown", "text", "gitcommit", "scratch" },
|
||||||
|
|||||||
Reference in New Issue
Block a user