Skip to content

feature/question: support one otter buffer per code block #264

@primalmotion

Description

@primalmotion

When I have multiple Lua blocks injected in a YAML file, otter merges them all into one virtual buffer. This makes the LSP think they're all in the same scope, which causes annoying false positives.
What happens now:

tasks:
  - name: task1
    script: |-
      local x = 1
      print(x)
  
  - name: task2
    script: |-
      local x = 2  -- LSP complains about redefined-local
      print(x)

These are completely separate scripts that run independently, but lua_ls sees them as one file and warns about redefined variables.

How can I make it so every different lua code in here be completely independent?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions