anasinnyk / nvim-k8s-crd

Neovim plugin designed to synchronize Kubernetes Custom Resource Definitions (CRDs) with your Neovim setup
MIT License
8 stars 0 forks source link

placing JSON schema cache dir in $HOME does not start LSP #1

Open chr0n1x opened 4 weeks ago

chr0n1x commented 4 weeks ago

my config:

  -- in my packer.nvim config
  use {
    'anasinnyk/nvim-k8s-crd',
    requires = { 'neovim/nvim-lspconfig' },
    config = function()
      require('k8s-crd').setup({
        cache_dir = vim.fn.expand("$HOME/.cache/nvim-k8s-crd/"),
        k8s = { file_mask = "*.yaml", },
      })
    end
  }

what ends up happening is that $HOME/.cache/nvim-k8s-crd/ ends up being expanded, but then the LSP server never pulls any data while editing any files. however if I change the dir to .cache/nvim-k8s-crd/, all JSON schemas get downloaded to my cwd, and the LSP loads in suggestions/annotations properly.

very weird.

PS: this plugin is actually really friggen awesome, great work and thank you!

anasinnyk commented 2 weeks ago

Hi, thanks for you request. Please try use ~ sign instead $HOME, HOME here is environment variable, and it doesn't exist in lua runtime.