Skip to content

How to configure yamlls at a workspace level for neovim? #961

@V4G4X

Description

@V4G4X

Summary

I mainly work with 2 types of YAML files. (In two separate projects)

  1. Cloudformation Templates
  2. OpenAPI 3.0.0 specs

And the inbuilt validator doesn't work too well with these. So I wanted to disable yamlls' validator for these two projects.

But the best I was able to do was disable it in my nvim-config, far from an ideal solution.

    lspconfig.yamlls.setup({
        settings = {
            yaml = {
                validate = false,
            }
        }
    })

I also tried configuring .vim/settings.json but that had no effect.
Please let me know how to configure this (or any other) LSP at a workspace level.

P.S: If it's possible to also specifically provide cloudformation schema or OpenAPI schemas for particular files/folders, that would be great!
But I digress.

Relevant information

yaml-language-server:

installed version 1.14.0
Path: /Users/<username>/.local/share/nvim/mason/bin/yaml-language-server --stdio

neovim:

NVIM v0.10.0-dev-2961+g4d52b0cf6
Build type: RelWithDebInfo
LuaJIT 2.1.1713484068

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions