Skip to content

Pop-up error messages cause traceback with read-only files #1612

@finite-state-machine

Description

@finite-state-machine

Greetings!

I've noticed the following traceback appearing at the bottom of my VIm window immediately or very shortly after opening a read-only file. (I have typos-lsp installed, so even a read-only text file can have LSP errors.)

I suspect this relates to lsp_diagnostic_float_* functionality.

[Aside: I want to sincerely thank the authors and maintainers of this indispensable tool, which I use daily. Your contributions are truly appreciated!]

Error detected while processing function <SNR>47_debounceTimeTimerCallback[1]..<SNR>47_mapFSourceCallback[1]..<SNR>47_distinctUntilChangedSourceCallback[14]..<SNR>47_fiterSourceCallback[6]..<SNR>47_filterSourceCallback[6]..<SNR>47_mapFSourceCallback[1]..<SNR>47_subscribeSourceCallback[2]..<lambda33[1]..<SNR>166_show_float:
line    4:
W10: Warning: Changing a readonly file
Press ENTER or type command to continue

(The screenshot shows the output of :messages, but of course the traceback text is the same.)
Image

Captured settings (output of :let as captured by :redir …, sorted, and limited to lsp_* variables):

lsp_async_completion  #0
lsp_auto_enable       #1
lsp_code_action_ui     preview
lsp_completion_documentation_delay #80
lsp_completion_documentation_enabled #1
lsp_completion_resolve_timeout #200
lsp_debug_servers     []
lsp_diagnostics_echo_cursor #1
lsp_diagnostics_echo_delay #500
lsp_diagnostics_enabled #1
lsp_diagnostics_float_cursor #1
lsp_diagnostics_float_delay #500
lsp_diagnostics_float_insert_mode_enabled #1
lsp_diagnostics_highlights_delay #500
lsp_diagnostics_highlights_enabled #1
lsp_diagnostics_highlights_insert_mode_enabled #1
lsp_diagnostics_signs_delay #500
lsp_diagnostics_signs_enabled #1
lsp_diagnostics_signs_error {}
lsp_diagnostics_signs_hint {}
lsp_diagnostics_signs_information {}
lsp_diagnostics_signs_insert_mode_enabled #1
lsp_diagnostics_signs_priority #10
lsp_diagnostics_signs_priority_map {}
lsp_diagnostics_signs_warning {}
lsp_diagnostics_virtual_text_align  after
lsp_diagnostics_virtual_text_delay #500
lsp_diagnostics_virtual_text_enabled #1
lsp_diagnostics_virtual_text_insert_mode_enabled #0
lsp_diagnostics_virtual_text_padding_left #2
lsp_diagnostics_virtual_text_prefix  #LSP 
lsp_diagnostics_virtual_text_wrap  wrap
lsp_document_code_action_signs_delay #500
lsp_document_code_action_signs_enabled #1
lsp_document_code_action_signs_hint {}
lsp_document_code_action_signs_priority #10
lsp_document_highlight_delay #350
lsp_document_highlight_enabled #0
lsp_document_symbol_detail #0
lsp_experimental_workspace_folders #1
lsp_float_max_width   #-1
lsp_fold_enabled      #1
lsp_format_sync_timeout #-1
lsp_get_supported_capabilities [function('lsp#default_get_supported_capabilities')]
lsp_hover_conceal     #0
lsp_hover_ui           preview
lsp_ignorecase        #1
lsp_inlay_hints_delay #350
lsp_inlay_hints_enabled #0
lsp_inlay_hints_mode  {'normal': ['curline']}
lsp_insert_text_enabled #1
lsp_loaded            #1
lsp_log_file           
lsp_log_verbose       #1
lsp_max_buffer_size   #5000000
lsp_peek_alignment     top
lsp_preview_autoclose #1
lsp_preview_doubletap [function('lsp#ui#vim#output#focuspreview')]
lsp_preview_fixup_conceal #-1
lsp_preview_float     #1
lsp_preview_keep_focus #1
lsp_preview_max_height #-1
lsp_preview_max_width #-1
lsp_semantic_delay    #500
lsp_semantic_enabled  #0
lsp_settings          {'typos-lsp': {'disabled': v:false}, 'basedpyright-langserver': {'settings': {'basedpyright': {'analysis': {'diagnosticMode': 'workspace', 'useTypingExtensions': v:true, 'verboseOutput': v:true, 'disableOrganizeImports': v:false, 'inlayHints': {'genericTypes': v:true}}}}, 'disabled': v:false}, 'pyright-langserver': {'settings': {'pyright': {'analysis': {'diagnosticMode': 'workspace', 'useTypingExtensions': v:true, 'verboseOutput': v:true, 'disableOrganizeImports': v:false, 'inlayHints': {'genericTypes': v:true}}}}, 'disabled': v:false}, 'pylsp-all': {'args': ['--log-file', '/tmp/pylsp.log', '-v'], 'workspace_config': {'pylsp': {'plugins': {'pylsp_mypy': {'enabled': v:true}, 'pycodestyle': {'hangClosing': v:true, 'enabled': v:false}, 'rope_autoimport': {'enabled': v:true}, 'rope_completion': {'enabled': v:true}, 'pydocstyle': {'enabled': v:false, 'convention': 'google'}}}}}, 'ruff': {'disabled': v:true}, 'jedi-language-server': {'disabled': v:true}}
lsp_settings_filetype_python  basedpyright-langserver
lsp_settings_root_markers ['.git', '.git/', '.svn', '.hg', '.bzr', 'pyrightconfig.json', 'pyproject.toml']
lsp_show_message_log_level  warning
lsp_show_message_request_enabled #1
lsp_show_workspace_edits #0
lsp_signature_help_delay #200
lsp_signature_help_enabled #1
lsp_tagfunc_source_methods ['definition', 'declaration', 'implementation', 'typeDefinition']
lsp_text_document_did_save_delay #-1
lsp_text_edit_enabled #1
lsp_tree_incoming_prefix  <= 
lsp_untitled_buffer_enabled #1
lsp_use_event_queue   #1
lsp_use_lua           #1
lsp_use_native_client #1
lsp_work_done_progress_enabled #0

Version:
latest as of this date (2025-08-19): 04428c9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions