diff options
| author | William Boman <william@redwill.se> | 2025-05-19 07:56:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-19 07:56:31 +0200 |
| commit | 1d6730459c42f591602500da994f01ae43a97dbc (patch) | |
| tree | c78417dd383456d2ef8a00600375534d17a9cd45 /scripts/nvim.sh | |
| parent | chore: fix references to williamboman/mason.nvim (#542) (diff) | |
| download | mason-lspconfig-1d6730459c42f591602500da994f01ae43a97dbc.tar mason-lspconfig-1d6730459c42f591602500da994f01ae43a97dbc.tar.gz mason-lspconfig-1d6730459c42f591602500da994f01ae43a97dbc.tar.bz2 mason-lspconfig-1d6730459c42f591602500da994f01ae43a97dbc.tar.lz mason-lspconfig-1d6730459c42f591602500da994f01ae43a97dbc.tar.xz mason-lspconfig-1d6730459c42f591602500da994f01ae43a97dbc.tar.zst mason-lspconfig-1d6730459c42f591602500da994f01ae43a97dbc.zip | |
perf: host pre-compiled filetype mappings (#555)
Generating the filetype mappings by accessing `vim.lsp.config` turns out to be a bad idea because:
1) performance
2) some `lsp/` configurations in nvim-lspconfig execute code immediately (see angularls)
3) accessing `vim.lsp.config[server_name]` seems to populate `:checkhealth vim.lsp`
Diffstat (limited to 'scripts/nvim.sh')
| -rwxr-xr-x | scripts/nvim.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/nvim.sh b/scripts/nvim.sh new file mode 100755 index 0000000..c2dcb6b --- /dev/null +++ b/scripts/nvim.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -exuo pipefail + +declare -x DEPENDENCIES="${PWD}/dependencies" +declare -x MASON_DIR="$PWD" +declare -x MASON_SCRIPT_DIR="${PWD}/scripts" + +nvim -u NONE -E -R --headless \ + --cmd "set rtp^=${MASON_SCRIPT_DIR},${MASON_DIR}" \ + --cmd "set packpath^=${DEPENDENCIES}" \ + --cmd "packloadall" \ + --cmd "luafile $1" \ + --cmd "q" |
