add possibility to globally disable lsp virtual text
This commit is contained in:
parent
5cefd8c21e
commit
c1a3e10946
2 changed files with 12 additions and 17 deletions
19
README.md
19
README.md
|
@ -183,22 +183,6 @@ All that is saved in image, so that is why image is so heavy.
|
||||||
|
|
||||||
### Commands and keys
|
### 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
|
#### General
|
||||||
|
|
||||||
|keys|action|
|
|keys|action|
|
||||||
|
@ -335,10 +319,11 @@ GitSings provides some commands for displaying git stuff:
|
||||||
|\<leader\>wr |remove workspace folder|
|
|\<leader\>wr |remove workspace folder|
|
||||||
|\<leader\>wl | list workspace folders |
|
|\<leader\>wl | list workspace folders |
|
||||||
|
|
||||||
#### LSP diagnostics (trouble.nvim)
|
#### LSP diagnostics (custom and trouble.nvim)
|
||||||
|
|
||||||
|||
|
|||
|
||||||
|----|----|
|
|----|----|
|
||||||
|
|\<leader\>vt| switch display of virtual text|
|
||||||
|\<leader\>xx| Open diagnostics window|
|
|\<leader\>xx| Open diagnostics window|
|
||||||
|\<leader\>xw |workspace diagnostics|
|
|\<leader\>xw |workspace diagnostics|
|
||||||
|\<leader\>xd |document diagnostics|
|
|\<leader\>xd |document diagnostics|
|
||||||
|
|
|
@ -19,6 +19,16 @@ end
|
||||||
-- open nvim tree on start
|
-- open nvim tree on start
|
||||||
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
|
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", "<leader>vt", ":lua switch_virtual_text()<CR>")
|
||||||
|
|
||||||
-- tab lines in normal and visual mode
|
-- tab lines in normal and visual mode
|
||||||
map("n", "<Tab>", ">>")
|
map("n", "<Tab>", ">>")
|
||||||
map("n", "<S-Tab>", "<<")
|
map("n", "<S-Tab>", "<<")
|
||||||
|
|
Loading…
Reference in a new issue