<p>i try to get kubernetes auto completion going in nvim. I am using neovim nightly (0.5.) with 'neovim-lspconfig' and 'nvim-lua/completion-nvim'.
I installed the yaml-language-sever and it is working fine (i know it is working because it is showing errors inside yaml files in nvim).</p>
<p>I am fairly new to lua and nvim-lsp, it might just be a syntax error. I try to configure the server with this lua code:</p>
<pre><code>local lspconfig = require'lspconfig'
lspconfig.yamlls.setup{
    on_attach = require'completion'.on_attach,
    settings = {
        yaml.schemas = { kubernetes = &quot;globPattern&quot; },
    }
}
</code></pre>
<p>I tried thousand different ways to write it but i always get Errors like:</p>
<blockquote>
<p>Error loading lua [string &quot;:lua&quot;]:5: '}' expected (to close '{' at
line 4) near '='</p>
</blockquote>
<p>The <a href="https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md" rel="nofollow noreferrer">documentation</a> just says to add server configs via the settings key. But i am not quite sure how.</p>
<p>Anybody got this going? Thanks a lot.</p>

Y-Peter
<p>You should change it to</p>
<pre class="lang-lua prettyprint-override"><code>lspconfig.yamlls.setup{
    settings = {
        yaml = {
           schemas = { kubernetes = &quot;globPattern&quot; },
      }
}
</code></pre>
