mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 16:41:43 +05:30
- 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
23 lines
675 B
Lua
23 lines
675 B
Lua
require("shared.text_settings").setup()
|
|
|
|
local function check_codelens_support()
|
|
local clients = vim.lsp.get_clients({ bufnr = 0 })
|
|
for _, c in ipairs(clients) do
|
|
if c.server_capabilities.codeLensProvider then
|
|
return true
|
|
end
|
|
end
|
|
return false
|
|
end
|
|
|
|
vim.api.nvim_create_autocmd({ "TextChanged", "InsertLeave", "CursorHold", "LspAttach", "BufEnter" }, {
|
|
buffer = vim.api.nvim_get_current_buf(),
|
|
callback = function()
|
|
if check_codelens_support() then
|
|
vim.lsp.codelens.refresh({ bufnr = 0 })
|
|
end
|
|
end,
|
|
})
|
|
-- trigger codelens refresh
|
|
vim.api.nvim_exec_autocmds("User", { pattern = "LspAttached" })
|