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

Consider attaching server when editing new file, not just existing files, when autostart = false #2712

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Nov 7, 2023

  1. fix: consider attaching when editing new file

    BufReadPost does not trigger when editing a nonexistent file, so
    language servers would not automatically attach when editing a new file
    if autostart was disabled or if the server had no associated filetypes.
    This fixes that by adding BufNewFile to autocommands hooked to
    BufReadPost.
    Diomendius committed Nov 7, 2023
    Configuration menu
    Copy the full SHA
    8368a88 View commit details
    Browse the repository at this point in the history
  2. fix: ensure try_add() runs after filetype detection

    Sometimes, BufNewFile triggers before 'filetype' is set. Using
    vim.schedule() should ensure filetype detection runs before the
    callback.
    Diomendius committed Nov 7, 2023
    Configuration menu
    Copy the full SHA
    2ccafd1 View commit details
    Browse the repository at this point in the history