-
Notifications
You must be signed in to change notification settings - Fork 748
feat: add NullLsToggle command #1188
base: main
Are you sure you want to change the base?
Changes from 1 commit
668eb58
f92184f
756b42b
3ea6e57
99f1415
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,10 +32,24 @@ M.setup = function(user_config) | |
| vim.api.nvim_create_user_command("NullLsInfo", function() | ||
| require("null-ls.info").show_window() | ||
| end, {}) | ||
|
|
||
| vim.api.nvim_create_user_command("NullLsLog", function() | ||
| vim.cmd(string.format("edit %s", require("null-ls.logger"):get_path())) | ||
| end, {}) | ||
|
|
||
| vim.api.nvim_create_user_command("NullLsToggle", function(opts) | ||
| M.toggle(opts.args) | ||
| end, { | ||
| nargs = 1, | ||
| complete = function() | ||
| local list = {} | ||
| for _, source in ipairs(M.get_sources()) do | ||
|
||
| list[#list + 1] = source.name | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think there's a possibility of duplicate sources here, e.g. if the user has
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this will depend on how
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we just pass |
||
| end | ||
| return list | ||
| end, | ||
| }) | ||
|
|
||
| local augroup = vim.api.nvim_create_augroup("NullLs", {}) | ||
| vim.api.nvim_create_autocmd("FileType", { | ||
| group = augroup, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.