Skip to content

Commit

Permalink
fix(code actions): don't sort actions by title (#63)
Browse files Browse the repository at this point in the history
Not all code action sources want their actions to be sorted
alphabetically.

The source itself should determine the order of the actions by how they
add them to the return table.

See: #62
  • Loading branch information
davidmh authored Jan 19, 2024
1 parent 85da59b commit e64f03f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lua/null-ls/code-actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ M.handler = function(method, original_params, handler)
callback = function(actions)
log:trace("received code actions from generators")
log:trace(vim.inspect(actions))

-- sort actions by title
table.sort(actions, function(a, b)
return a.title < b.title
end)
handler(actions)
end,
})
Expand Down

0 comments on commit e64f03f

Please sign in to comment.