Skip to content

Commit

Permalink
format with markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
davidosomething committed Oct 30, 2024
1 parent 64993ea commit c7576fa
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion nvim/lua/dko/plugins/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,24 @@ local uis = vim.api.nvim_list_uis()
local has_ui = #uis > 0

return {
{
"davidosomething/format-ts-errors.nvim",
dev = true,
config = function()
require("format-ts-errors").setup({
add_markdown = true,
start_indent_level = 0,
})
end,
},

-- Using this for tsserver specifically, faster results than nvim-lsp
{
"neoclide/coc.nvim",
branch = "release",
cond = has_ui and dkosettings.get("use_coc"),
dependencies = {
{ "davidosomething/format-ts-errors.nvim", dev = true },
{ "davidosomething/format-ts-errors.nvim" },
{ "davidosomething/coc-diagnostics-shim.nvim", dev = true },
},
init = function()
Expand All @@ -35,6 +46,7 @@ return {
coctsserver = {
---@diagnostic disable-next-line: unused-local
function(linter_name, item, formatted)
---@type (fun(message: string):string) | nil
local prettifier = require("format-ts-errors")[item.code]
if not prettifier then
vim.schedule(function()
Expand Down

0 comments on commit c7576fa

Please sign in to comment.