diff --git a/README.md b/README.md index f3e16e4..ae76b92 100644 --- a/README.md +++ b/README.md @@ -183,22 +183,6 @@ All that is saved in image, so that is why image is so heavy. ### Commands and keys -#### root perms when editing - -```bash -# Re-open a current file with sudo -:SudaRead -# Open /etc/sudoers with sudo -:SudaRead /etc/sudoers -``` - -```bash -# Forcedly save a current file with sudo -:SudaWrite -# Write contents to /etc/profile -:SudaWrite /etc/profile -``` - #### General |keys|action| @@ -335,10 +319,11 @@ GitSings provides some commands for displaying git stuff: |\wr |remove workspace folder| |\wl | list workspace folders | -#### LSP diagnostics (trouble.nvim) +#### LSP diagnostics (custom and trouble.nvim) ||| |----|----| +|\vt| switch display of virtual text| |\xx| Open diagnostics window| |\xw |workspace diagnostics| |\xd |document diagnostics| diff --git a/lua/general.lua b/lua/general.lua index 92c3d2e..2367332 100644 --- a/lua/general.lua +++ b/lua/general.lua @@ -19,6 +19,16 @@ end -- open nvim tree on start vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree }) +-- disabling virtual text +VIRTUAL_TEXT_ENABLED = true +function switch_virtual_text() + VIRTUAL_TEXT_ENABLED = not VIRTUAL_TEXT_ENABLED + vim.diagnostic.config({ + virtual_text = VIRTUAL_TEXT_ENABLED, + }) +end +map("n", "vt", ":lua switch_virtual_text()") + -- tab lines in normal and visual mode map("n", "", ">>") map("n", "", "<<")