diff options
| author | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-01-05 15:36:24 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-05 15:36:24 -0800 |
| commit | 4da80d7c9cb6dab69787e2a0ed7b5c8eecfc2856 (patch) | |
| tree | 0a2136b94c8dac4866a0cad66355042ca2fe6ce9 | |
| parent | Merge pull request #544 from mjlbach/clarify_on_new_config (diff) | |
| parent | [docgen] Update README.md (diff) | |
| download | nvim-lspconfig-4da80d7c9cb6dab69787e2a0ed7b5c8eecfc2856.tar nvim-lspconfig-4da80d7c9cb6dab69787e2a0ed7b5c8eecfc2856.tar.gz nvim-lspconfig-4da80d7c9cb6dab69787e2a0ed7b5c8eecfc2856.tar.bz2 nvim-lspconfig-4da80d7c9cb6dab69787e2a0ed7b5c8eecfc2856.tar.lz nvim-lspconfig-4da80d7c9cb6dab69787e2a0ed7b5c8eecfc2856.tar.xz nvim-lspconfig-4da80d7c9cb6dab69787e2a0ed7b5c8eecfc2856.tar.zst nvim-lspconfig-4da80d7c9cb6dab69787e2a0ed7b5c8eecfc2856.zip | |
Merge pull request #545 from mjlbach/improve_root_pattern_documentation
Documentation: improve description of root pattern
| -rw-r--r-- | README.md | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -179,9 +179,12 @@ lspconfig.SERVER.setup{config} If nil is returned, the buffer is skipped. See |lspconfig.util.search_ancestors()| and the functions which use it: - - |lspconfig.util.root_pattern(patterns...)| finds an ancestor which - - contains one of the files in `patterns...`. This is equivalent - to coc.nvim's "rootPatterns" + - |lspconfig.util.root_pattern(pattern1, pattern2...)| is a variadic function which + takes string patterns as arguments, and finds an ancestor + which contains one of the files matching the pattern. + Each pattern can be a specific filename, such as ".git", or a glob. + See `:help glob` for allowed patterns. This is equivalent to + coc.nvim's "rootPatterns" - Related utilities for common tools: - |lspconfig.util.find_git_root()| - |lspconfig.util.find_node_modules_root()| |
