Skip to content

Commit

Permalink
fix: remove buf = 0 sorting since it acts weirdly with next/prev
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 30, 2024
1 parent 11fae78 commit 2b589e9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lua/trouble/sources/diagnostics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ M.config = {
{ "directory" },
{ "filename", format = "{file_icon} {basename} {count}" },
},
sort = { { buf = 0 }, "severity", "filename", "pos", "message" },
sort = { "severity", "filename", "pos", "message" },
format = "{severity_icon} {message:md} {item.source} ({code}) {pos}",
-- filter = {
-- ["not"] = {
Expand Down
4 changes: 2 additions & 2 deletions lua/trouble/sources/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ M.config = {
groups = {
{ "filename", format = "{file_icon} {filename} {count}" },
},
sort = { { buf = 0 }, "filename", "pos", "text" },
sort = { "filename", "pos", "text" },
-- sort = { { buf = 0 }, { kind = "Function" }, "filename", "pos", "text" },
format = "{kind_icon} {symbol.name} {text:Comment} {pos}",
},
Expand All @@ -45,7 +45,7 @@ M.config = {
groups = {
{ "filename", format = "{file_icon} {filename} {count}" },
},
sort = { { buf = 0 }, "filename", "pos", "text" },
sort = { "filename", "pos", "text" },
format = "{text:ts} ({item.client}) {pos}",
},
lsp = {
Expand Down
4 changes: 2 additions & 2 deletions lua/trouble/sources/qf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ M.config = {
groups = {
{ "filename", format = "{file_icon} {filename} {count}" },
},
sort = { { buf = 0 }, "severity", "filename", "pos", "message" },
sort = { "severity", "filename", "pos", "message" },
format = "{severity_icon|item.type:DiagnosticSignWarn} {text} {pos}",
},
loclist = {
Expand All @@ -40,7 +40,7 @@ M.config = {
groups = {
{ "filename", format = "{file_icon} {filename} {count}" },
},
sort = { { buf = 0 }, "severity", "filename", "pos", "message" },
sort = { "severity", "filename", "pos", "message" },
format = "{severity_icon|item.type:DiagnosticSignWarn} {text} {pos}",
},
},
Expand Down

0 comments on commit 2b589e9

Please sign in to comment.