ecosse3 / nvim

A non-minimal Neovim config built to work most efficiently with Frontend Development
GNU General Public License v3.0
1.22k stars 107 forks source link

feat(lsp): create option to toggle inline messages #68

Closed techapostle closed 2 years ago

techapostle commented 2 years ago

Provides the option to toggle inline LSP messages, errors, and warnings from the lua/config.lua file which provides the EcoVim table. The value can be changed using the boolean property of the lsp sub-table, called virtual_text.
For example:

  lsp = {
    virtual_text = false,
  },

This property is then carried over to lua/lsp/setup.lua, inside the local handlers, under textDocument/publishDiagnostics, where virtual_text is set to the value of EcoVim.lsp.virtual_text.

["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { virtual_text = EcoVim.lsp.virtual_text }),