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

How to autostart yamlls? #106

Open
JJGadgets opened this issue Jan 20, 2024 · 2 comments
Open

How to autostart yamlls? #106

JJGadgets opened this issue Jan 20, 2024 · 2 comments

Comments

@JJGadgets
Copy link

I'm using CosmicNvim for editing Kubernetes and generally YAML manifests, so I'd like to have yamlls (or yaml-language-server) working with CosmicNvim.

Here's my very minimal config, however I have to manually run :LspStart on every launch of Nvim for the yamlls LSP to actually do anything.

local config = {
  lsp = {
    format_on_save = true,
    ensure_installed = {
      'yamlls',
    },
    servers = {
      yamlls = true,
    },
  },
  disable_builtin_plugins = {
    'null_ls',
  },
}

return config

How should I approach this?

@mattleong
Copy link
Collaborator

Silly first question, but did you ensure that you installed the language server globally or via Mason?

@JJGadgets
Copy link
Author

JJGadgets commented Jan 27, 2024

@mattleong silly question for silly user haha, it's all good, ask away!

Mason installed it for me via that config snippet I provided above in Cosmic's config.lua file. I didn't do anything otherwise. Should I have installed it differently?

I added a janky autocmd to the end of init.lua after the default Cosmic init.lua code, and that somehow worked to solve the issue but feels bandaid-y, I'll grab it and post it here. Would like to learn the proper way to do things.

(might take a little bit because my laptop where the config was stored had the NVMe controller of the SSD (where /home was in) malfunction since the issue was created :( data's extracted but inconvenient to access)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants