mirror of
https://github.com/ksyasuda/dotfiles.git
synced 2025-12-05 02:53:38 -08:00
update nvim config
This commit is contained in:
@@ -7,7 +7,7 @@ return {
|
||||
integrations = {
|
||||
markdown = {
|
||||
enabled = true,
|
||||
clear_in_insert_mode = false,
|
||||
clear_in_insert_mode = true,
|
||||
download_remote_images = true,
|
||||
only_render_image_at_cursor = false,
|
||||
floating_windows = false, -- if true, images will be rendered in floating markdown windows
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
vim.notify = require("notify")
|
||||
return {
|
||||
"epwalsh/obsidian.nvim",
|
||||
version = "*", -- recommended, use latest release instead of latest commit
|
||||
lazy = true,
|
||||
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"
|
||||
-- -- refer to `:h file-pattern` for more examples
|
||||
-- "BufReadPre path/to/my-vault/*.md",
|
||||
-- "BufNewFile path/to/my-vault/*.md",
|
||||
-- },
|
||||
dependencies = {
|
||||
-- Required.
|
||||
"nvim-lua/plenary.nvim",
|
||||
|
||||
-- see below for full list of optional dependencies 👇
|
||||
},
|
||||
opts = {
|
||||
workspaces = {
|
||||
{
|
||||
name = "vault",
|
||||
path = "~/S/obsidian/Vault",
|
||||
},
|
||||
-- {
|
||||
-- name = "work",
|
||||
-- path = "~/vaults/work",
|
||||
-- },
|
||||
},
|
||||
completion = {
|
||||
-- Set to false to disable completion.
|
||||
nvim_cmp = true,
|
||||
-- Trigger completion at 2 chars.
|
||||
min_chars = 2,
|
||||
},
|
||||
-- Optional, configure additional syntax highlighting / extmarks.
|
||||
-- This requires you have `conceallevel` set to 1 or 2. See `:help conceallevel` for more details.
|
||||
ui = {
|
||||
enable = true, -- set to false to disable all additional syntax features
|
||||
update_debounce = 200, -- update delay after a text change (in milliseconds)
|
||||
max_file_length = 5000, -- disable UI features for files with more than this many lines
|
||||
-- Define how various check-boxes are displayed
|
||||
checkboxes = {
|
||||
-- NOTE: the 'char' value has to be a single character, and the highlight groups are defined below.
|
||||
[" "] = { char = "", hl_group = "ObsidianTodo" },
|
||||
["x"] = { char = "", hl_group = "ObsidianDone" },
|
||||
[">"] = { char = "", hl_group = "ObsidianRightArrow" },
|
||||
["~"] = { char = "", hl_group = "ObsidianTilde" },
|
||||
["!"] = { char = "", hl_group = "ObsidianImportant" },
|
||||
-- Replace the above with this if you don't have a patched font:
|
||||
-- [" "] = { char = "☐", hl_group = "ObsidianTodo" },
|
||||
-- ["x"] = { char = "✔", hl_group = "ObsidianDone" },
|
||||
|
||||
-- You can also add more custom ones...
|
||||
},
|
||||
},
|
||||
attachments = {
|
||||
-- The default folder to place images in via `:ObsidianPasteImg`.
|
||||
-- If this is a relative path it will be interpreted as relative to the vault root.
|
||||
-- You can always override this per image by passing a full path to the command instead of just a filename.
|
||||
img_folder = "screenshots", -- This is the default
|
||||
|
||||
-- Optional, customize the default name or prefix when pasting images via `:ObsidianPasteImg`.
|
||||
---@return string
|
||||
img_name_func = function()
|
||||
-- Prefix image names with timestamp.
|
||||
return string.format("%s-", os.time())
|
||||
end,
|
||||
|
||||
-- A function that determines the text to insert in the note when pasting an image.
|
||||
-- It takes two arguments, the `obsidian.Client` and an `obsidian.Path` to the image file.
|
||||
-- This is the default implementation.
|
||||
---@param client obsidian.Client
|
||||
---@param path obsidian.Path the absolute path to the image file
|
||||
---@return string
|
||||
img_text_func = function(client, path)
|
||||
path = client:vault_relative_path(path) or path
|
||||
return string.format("", path.name, path)
|
||||
end,
|
||||
},
|
||||
-- Optional, by default when you use `:ObsidianFollowLink` on a link to an external
|
||||
-- URL it will be ignored but you can customize this behavior here.
|
||||
---@param url string
|
||||
follow_url_func = function(url)
|
||||
-- Open the URL in the default web browser.
|
||||
vim.fn.jobstart({ "open", url }) -- Mac OS
|
||||
-- vim.fn.jobstart({"xdg-open", url}) -- linux
|
||||
-- vim.cmd(':silent exec "!start ' .. url .. '"') -- Windows
|
||||
-- vim.ui.open(url) -- need Neovim 0.10.0+
|
||||
end,
|
||||
-- Optional, by default when you use `:ObsidianFollowLink` on a link to an image
|
||||
-- file it will be ignored but you can customize this behavior here.
|
||||
---@param img string
|
||||
follow_img_func = function(url)
|
||||
-- vim.fn.jobstart({ "qlmanage", "-p", img }) -- Mac OS quick look preview
|
||||
vim.fn.jobstart({ "xdg-open", url }) -- linux
|
||||
-- vim.cmd(':silent exec "!start ' .. url .. '"') -- Windows
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
return {
|
||||
url = "https://gitea.suda.codes/sudacode/odis",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"neovim/nvim-lspconfig",
|
||||
},
|
||||
opts = {
|
||||
opts = {
|
||||
display = {
|
||||
default_mode = "vsplit",
|
||||
picker = true,
|
||||
float = {
|
||||
maxwidth = 80,
|
||||
maxheight = 40,
|
||||
border = "rounded",
|
||||
title = true,
|
||||
style = "minimal",
|
||||
auto_focus = true,
|
||||
anchor = "bottom_right",
|
||||
offset = { row = -2, col = -2 },
|
||||
},
|
||||
window = {
|
||||
width = 0.4,
|
||||
height = 0.25,
|
||||
position = "bottom|right",
|
||||
floating = false,
|
||||
border = "none",
|
||||
},
|
||||
},
|
||||
integrations = {
|
||||
treesitter = {
|
||||
enabled = true, -- Enable Treesitter integration
|
||||
highlight = true, -- Enable syntax highlighting
|
||||
langs = { -- Language mapping for different doc types
|
||||
lsp = "markdown",
|
||||
man = "man",
|
||||
help = "vimdoc",
|
||||
},
|
||||
},
|
||||
},
|
||||
sources = {
|
||||
lsp = { enabled = true },
|
||||
vim = { enabled = true },
|
||||
man = { enabled = true },
|
||||
},
|
||||
priority = { "LSP", "Vim", "Man" },
|
||||
mappings = {
|
||||
close = "<leader>dc",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user