You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
There is an issue when there are accented characters on the same sentence where the completion is being triggered.
Take for instance the following example (in Portuguese):
[[#Referências]]
Aqui não vai [[[#Referências]]
Aqui também não [[[[#Referências]]
Aqui então, também não [[#[[#Referências]]## Referências1.
Notice the first completion worked fine, because there are no accented characters on the same sentence.
The following ones, depending on the number of accented characters, it will put the same number of undesired characters upon completion.
Config
{ -- obsidian.nvim
'epwalsh/obsidian.nvim',
--[[ version = '*', -- recommended, use latest release instead of latest commit ]]
dependencies = {
'nvim-lua/plenary.nvim',
},
ft = 'markdown',
keys = {
{ '<leader>oa', '<cmd>:ObsidianOpen<cr>', desc = 'Open in Obsidian app' },
{ '<leader>on', '<cmd>:ObsidianNewFromTemplate<cr>', desc = 'New note' },
{ '<leader>ob', '<cmd>:ObsidianBacklinks<cr>', desc = 'Backlinks' },
{ '<leader>ot', '<cmd>:ObsidianTags<cr>', desc = 'Tags' },
{ '<leader>oT', '<cmd>:ObsidianTemplate<cr>', desc = 'Templates' },
{ '<leader>ol', '<cmd>:ObsidianLinks<cr>', desc = 'Links' },
{ '<leader>ow', '<cmd>:ObsidianWorkspace<cr>', desc = 'Woskspaces' },
{ '<leader>or', '<cmd>:ObsidianRename<cr>', desc = 'Rename note' },
{ '<leader>op', '<cmd>:ObsidianPasteImg<cr>', desc = 'Paste Image' },
{ '<leader>odt', '<cmd>:ObsidianToday<cr>', desc = 'Today' },
{ '<leader>odT', '<cmd>:ObsidianTomorrow<cr>', desc = 'Tomorrow' },
{ '<leader>ody', '<cmd>:ObsidianYesterday<cr>', desc = 'Yesterday' },
{ '<leader>odd', '<cmd>:ObsidianDailies<cr>', desc = 'Daily notes' },
{ '<leader>ofv', '<cmd>:ObsidianFollowLink vsplit<cr>', desc = 'Vertical' },
{ '<leader>ofh', '<cmd>:ObsidianFollowLink hsplit<cr>', desc = 'Horizontal' },
},
opts = {
workspaces = {
{
name = 'second-brain',
path = vim.fn.expand '~/.local/share/code/second-brain/content',
overrides = {
attachments = { img_folder = 'Assets/Images/' },
daily_notes = {
folder = '2-Areas/Reflections/Daily/',
template = 'Daily.md',
},
templates = { folder = 'Assets/Templates/' },
--[[ disable_frontmatter = true, ]]
notes_subdir = '0-Inbox/',
new_notes_location = 'notes_subdir',
},
},
{
name = 'no-vault',
path = function()
return assert(vim.fs.dirname(vim.api.nvim_buf_get_name(0)))
end,
overrides = {
notes_subdir = vim.NIL,
new_notes_location = 'current_dir',
templates = {
folder = vim.NIL,
},
disable_frontmatter = true,
},
},
},
-- only one I found compatible with obsidian
wiki_link_func = 'use_alias_only',
open_notes_in = 'vsplit',
-- Linux uses xdg-open
---@param url string
follow_url_func = function(url)
vim.fn.jobstart { 'xdg-open', url }
end,
-- Treat titles as filenames
---@param spec { id: string, dir: obsidian.Path, title: string|? }
---@return string|obsidian.Path The full path to the new note.
note_path_func = function(spec)
local path = spec.dir / tostring(spec.title)
return path:with_suffix '.md'
end,
-- For now only title and tags are useful on frontmatter
---@return table
note_frontmatter_func = function(note)
local out = { title = note.title, tags = note.tags }
-- `note.metadata` contains any manually added fields in the frontmatter.
-- So here we just make sure those fields are kept in the frontmatter.
if note.metadata ~= nil and not vim.tbl_isempty(note.metadata) then
for k, v in pairs(note.metadata) do
out[k] = v
end
end
return out
end,
ui = {
checkboxes = {
[' '] = { char = ' ', hl_group = 'ObsidianTodo' },
['x'] = { char = ' ', hl_group = 'ObsidianDone' },
-- NOTE: Removing unused
-- [">"] = { char = "", hl_group = "ObsidianRightArrow" },
-- ["~"] = { char = "", hl_group = "ObsidianTilde" },
-- ["!"] = { char = "", hl_group = "ObsidianImportant" },
},
},
mappings = {
-- Overrides the 'gf' mapping to work on markdown/wiki links within your vault.
['gf'] = {
action = function()
return require('obsidian').util.gf_passthrough()
end,
opts = { noremap = false, expr = true, buffer = true },
},
-- NOTE: Disable this mapping because <cr> is more useful
--[[ ["<leader>ch"] = { ]]
--[[ action = function() ]]
--[[ return require("obsidian").util.toggle_checkbox() ]]
--[[ end, ]]
--[[ opts = { buffer = true }, ]]
--[[ }, ]]
-- Smart action depending on context, either follow link or toggle checkbox.
['<cr>'] = {
action = function()
return require('obsidian').util.smart_action()
end,
opts = { buffer = true, expr = true },
},
},
},
},
🐛 Describe the bug
Hello,
There is an issue when there are accented characters on the same sentence where the completion is being triggered.
Take for instance the following example (in Portuguese):
Notice the first completion worked fine, because there are no accented characters on the same sentence.
The following ones, depending on the number of accented characters, it will put the same number of undesired characters upon completion.
Config
Environment
The text was updated successfully, but these errors were encountered: