Skip to content

Parse error when encountering -- at beginning of deleted line containing ++ #13

@ambroisie

Description

@ambroisie

I was puzzled why the bit after a comment in a Lua file was not getting highlighted in red, turns out it is a parse ERROR according to :InspectTree:

Reproducer

diff --git a/modules/home/vim/plugin/settings/null-ls.lua b/modules/home/vim/plugin/settings/null-ls.lua
index e7265c7..eadf16a 100644
--- a/modules/home/vim/plugin/settings/null-ls.lua
+++ b/modules/home/vim/plugin/settings/null-ls.lua
@@ -18,16 +18,6 @@ null_ls.register({
     }),
 })
 
--- C, C++
-null_ls.register({
-    null_ls.builtins.formatting.clang_format.with({
-        -- Only used if available, but prefer clangd formatting if available
-        condition = function()
-            return utils.is_executable("clang-format") and not utils.is_executable("clangd")
-        end,
-    }),
-})
-
 -- Nix
 null_ls.register({
     null_ls.builtins.formatting.nixpkgs_fmt.with({
[...]
     (deletion) ; '---'
     (ERROR) ; '++'
      (ERROR) ; 'C, C'
[...]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions