someone-stole-my-name / yaml-companion.nvim

Get, set and autodetect YAML schemas in your buffers.
MIT License
221 stars 17 forks source link

Surely a daft question - I need to ask anyway #38

Open EdmundsEcho opened 1 year ago

EdmundsEcho commented 1 year ago

I have schemas up and running. It's a first for me in my nearly years of using neovim. I'm looking forward to being a bit more deterministic with the schema selection.

To that end, I understand what Telescope is although I don't use it much other than it being a dependency for other lua plugins (I'm still liking ctrp). Part of the need for Telescope in my understanding, is not being able to name each schema (the [schema_location:file_pattern] spec for configuring schemas seems to not support a map instead of an array).

So the question, how am I supposed to manually select a schema for a given buffer using Telescope?

I also have lualine up and running. It displays the active lsp. I can't seem to get the active schema to show-up using the function supplied in this repo's docs. This is clearly a separate question as it requires your confidence in my having configured companion correctly.

require("mason-lspconfig").setup_handlers({
    function(lsp)
        ...   
    end,
    ["yamlls"] = function()
        local yamlconfig = require("yaml-companion").setup({})
        lspconfig["yamlls"].setup(yamlconfig)
    end,
})