Skip to content

Commit

Permalink
[Docs] format README
Browse files Browse the repository at this point in the history
  • Loading branch information
qvalentin committed Dec 3, 2023
1 parent a3fe57b commit 6b59908
Showing 1 changed file with 54 additions and 59 deletions.
113 changes: 54 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,13 @@ Helm-ls is a [helm](https://github.com/helm/helm) language server protocol [LSP]

* [Demo](#demo)
* [Getting Started](#getting-started)
* [Download](#download)
* [Make it executable](#make-it-executable)
* [Integration with yaml-language-server](#integration-with-yaml-language-server)
* [Download](#download)
* [Make it executable](#make-it-executable)
* [Integration with yaml-language-server](#integration-with-yaml-language-server)
* [Configuration options](#configuration-options)
* [LSP Server](#lsp-server)
* [yaml-language-server config](#yaml-language-server-config)
* [Default Configuration](#default-configuration)
* [Editor Config examples](#editor-config-examples)
* [Neovim (using nvim-lspconfig)](#neovim-using-nvim-lspconfig)
* [Vim Helm Plugin](#vim-helm-plugin)
* [Setup laguage server](#setup-laguage-server)
* [Emacs eglot setup](#emacs-eglot-setup)
* [LSP Server](#lsp-server)
* [yaml-language-server config](#yaml-language-server-config)
* [Emacs eglot setup](#emacs-eglot-setup)
* [Contributing](#contributing)
* [License](#license)

Expand Down Expand Up @@ -86,64 +81,64 @@ You can configure helm-ls with lsp workspace configurations.

### yaml-language-server config

- **Enable yaml-language-server**: Toggle support of this feature.
- **Path to yaml-language-server**: Specify the executable location.
- **Diagnostics Settings**:
- **Limit**: Number of displayed diagnostics per file.
- **Show Directly**: Show diagnostics while typing.

- **Additional Settings** (see [yaml-language-server](https://github.com/redhat-developer/yaml-language-server#language-server-settings)):
- **Schemas**: Define YAML schemas.
- **Completion**: Enable code completion.
- **Hover Information**: Enable hover details.

### Default Configuration

```lua
settings = {
['helm-ls'] = {
logLevel = "debug",
yamlls = {
enabled = true,
diagnosticsLimit = 50,
showDiagnosticsDirectly = false,
path = "yaml-language-server",
config = {
schemas = {
kubernetes = "**",
},
completion = true,
hover = true,
-- any other config: https://github.com/redhat-developer/yaml-language-server#language-server-settings
}
}
}
}
```

## Editor Config examples
- **Enable yaml-language-server**: Toggle support of this feature.
- **Path to yaml-language-server**: Specify the executable location.
- **Diagnostics Settings**:
- **Limit**: Number of displayed diagnostics per file.
- **Show Directly**: Show diagnostics while typing.

### Neovim (using nvim-lspconfig)
#### Vim Helm Plugin
You'll need [vim-helm](https://github.com/towolf/vim-helm) plugin installed before using helm_ls, to install it using vim-plug (or use your preferred plugin manager):
```lua
Plug 'towolf/vim-helm'
```
- **Additional Settings** (see [yaml-language-server](https://github.com/redhat-developer/yaml-language-server#language-server-settings)):
- **Schemas**: Define YAML schemas.
- **Completion**: Enable code completion.
- **Hover Information**: Enable hover details.

#### Setup laguage server
```lua
local lspconfig = require('lspconfig')
### Default Configuration

lspconfig.helm_ls.setup {
```lua
settings = {
['helm-ls'] = {
logLevel = "debug",
yamlls = {
enabled = true,
diagnosticsLimit = 50,
showDiagnosticsDirectly = false,
path = "yaml-language-server",
config = {
schemas = {
kubernetes = "**",
},
completion = true,
hover = true,
-- any other config: https://github.com/redhat-developer/yaml-language-server#language-server-settings
}
}
}
}
}
```
```

## Editor Config examples

### Neovim (using nvim-lspconfig)
#### Vim Helm Plugin
You'll need [vim-helm](https://github.com/towolf/vim-helm) plugin installed before using helm_ls, to install it using vim-plug (or use your preferred plugin manager):
```lua
Plug 'towolf/vim-helm'
```

#### Setup laguage server
```lua
local lspconfig = require('lspconfig')

lspconfig.helm_ls.setup {
settings = {
['helm-ls'] = {
yamlls = {
path = "yaml-language-server",
}
}
}
}
```
See [examples/nvim/init.lua](https://github.com/mrjosh/helm-ls/blob/master/examples/nvim/init.lua) for an
complete example, which also includes yaml-language-server.

Expand Down

0 comments on commit 6b59908

Please sign in to comment.