feat: Enhances breakpoint editing
The keymapping `<leader>B` is now configured to guide users through the
process of adding a `condition`, `hitCondition`, and `logMessage` to a
breakpoint.
---------
Co-authored-by: Brian Lehrer <661570+blehrer@users.noreply.github.com>
This could help beginners to get autocompletion, catch mistakes earlier,
and allow them to skip the docs for simple configs.
This is not perfect because a lot of the plugins type all of their keys
as required, even though they have defaults, but this is good enough.
The following lines do nothing and can be removed:
format = function(diagnostic)
local diagnostic_message = {
[vim.diagnostic.severity.ERROR] = diagnostic.message,
[vim.diagnostic.severity.WARN] = diagnostic.message,
[vim.diagnostic.severity.INFO] = diagnostic.message,
[vim.diagnostic.severity.HINT] = diagnostic.message,
}
return diagnostic_message[diagnostic.severity]
end,
The following line causes diagnostics which aren't of severity level
error to not have the specific text area underlined. This is less useful
than the default of showing underlines for all diagnostic levels, so
remove this line as well:
underline = { severity = vim.diagnostic.severity.ERROR },
The functions of vim.highlight were renamed to vim.hl on commit
18b43c331d8a0ed87d7cbefe2a18543b8e4ad360 of neovim, which was applied
with the release of nvim version 0.11.
Now, the use of vim.highlight is deprecated, and instead, one should
use vim.hl functions.
In practice, vim.highlight is still working, however, asking for help
for vim.highlight.on_yank fails (E149), while asking for help for
vim.hl.on_yank works as expected. So, by updating the used function, a
new user will have easier time looking getting the relevant help.
Co-authored-by: Omri Sarig <omri.sarig@prevas.dk>
* Replace vim.opt with vim.o
Because it offers a nicer interface and info on hover.
For now leave vim.opt when using the table interface (until vim.o
with tables is implemented)
* Add type hint for vim.opt.rtp
* Add a comment about using vim.opt instead of vim.o
* docs: clarify using opts = {} vs config = function() ... require('plugin').setup({}) .. end
The current documentation mentioning that using "require" is equivalent to using "opts" without detailing the use in the "config = function()" block seems inaccurate.
Lower in the configuration the "config = function()" block is used without clarifying why it needed and what it does.
This clarification may help new users understand the difference between the two, or how and where to place the "require" statement.
* Update init.lua
* remove whitespace