Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I want to suppress warning messages. #96

Closed
nabezokodaikon opened this issue Jan 18, 2020 · 8 comments
Closed

I want to suppress warning messages. #96

nabezokodaikon opened this issue Jan 18, 2020 · 8 comments
Labels
documentation Improvements or additions to documentation

Comments

@nabezokodaikon
Copy link
Contributor

nabezokodaikon commented Jan 18, 2020

Problems summary

A warning message is displayed.

Expected

I want to suppress warning messages.

Environment Information

  • nvim-lsp version (SHA1): 7a15a52

  • deoplete-lsp version (SHA1): 7a8c44f423bc4339c092a759abaad40131d2c98a

  • deoplete version (SHA1): 5be25591770c5abc7214e8899c4d451c479ac2ec

  • OS: Mac

  • neovim/Vim :version output: NVIM v0.5.0-316-g8fe0635e7

Plugins and settings

[[plugins]]	
repo = 'Shougo/deoplete.nvim'	
hook_add = ''' 	
call deoplete#custom#var('omni', 'input_patterns', {
    \ 'rust': '(\.|::|->)\w',
    \})

call deoplete#custom#option('sources', {
    \ 'rust': ['lsp'],
    \})
   
call deoplete#custom#source('_', 'converters', [
    \ 'converter_remove_paren',
    \ 'converter_remove_overlap',
    \ 'matcher_length',
    \ 'converter_truncate_abbr',
    \ 'converter_truncate_info',
    \ 'converter_truncate_menu',
    \ 'converter_auto_delimiter',
    \])

set completeopt-=preview

call deoplete#enable()	
'''

[[plugins]]
repo = 'Shougo/deoplete-lsp'	

[[plugins]]
repo = 'neovim/nvim-lsp'
hook_add = '''
    command! Scratch lua require'lsp'.makeScratch()
'''

.config/nvim/lua/lsp.lua

-- 
local api = vim.api
local M = {}
function M.makeScratch()
    require'nvim_lsp'.rls.setup{}
end
return M

How to reproduce the problem from neovim startup

  1. $ cargo new issue-rust
  2. $ cd issue-rust
  3. $ nvim
  4. :Scratch
  5. :e src/main.rs
  6. Type appropriately

スクリーンショット 2020-01-18 15 03 51

@justinmk justinmk added the documentation Improvements or additions to documentation label Jan 18, 2020
@irevoire
Copy link

irevoire commented Dec 8, 2020

Hello, I'm also interested, did you found a solution?

@nabezokodaikon
Copy link
Contributor Author

I don't know for now ...

@mjlbach
Copy link
Contributor

mjlbach commented Dec 18, 2020

If I'm understanding you right, you want to suppress virtual text. Try adding the following code.

" LSP settings
" log file location: /Users/michael/.local/share/nvim/vim-lsp.log
:lua << EOF
  -- Add nvim-lspconfig plugin
  local on_attach = function(_, bufnr)
    vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
      vim.lsp.diagnostic.on_publish_diagnostics, {
        -- disable virtual text
        virtual_text = false,

        -- show signs
        signs = true,

        -- delay update diagnostics
        update_in_insert = false,
      }
    )
EOF

@nabezokodaikon
Copy link
Contributor Author

it is complete! Thank you!

@mjlbach
Copy link
Contributor

mjlbach commented Dec 19, 2020

Maybe we should add this into the readme, it's a builtin feature now in neovim core, but a short nod to the docs might be handy

@00sapo
Copy link

00sapo commented Jun 24, 2021

How to disable warnings also in the sign column?

@DonjiKong
Copy link

DonjiKong commented Mar 24, 2023

how do I disable warnings on virtual text and sign columns with < leader >hw

@mminski
Copy link

mminski commented May 19, 2023

let g:lsp_document_code_action_signs_enabled=0
@00sapo @DonjiKong
dunno if thats right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

7 participants