From 8e4a6745d713d8af602ac044a66abbcb8387b359 Mon Sep 17 00:00:00 2001 From: Maciej Lebiest Date: Sun, 26 Feb 2023 18:36:34 +0100 Subject: [PATCH] restore default treesitter install list, fix sessions saving --- Dockerfile | 2 +- README.md | 5 +++-- lua/plugins/treesitter.lua | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3b178a8..34eecef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ RUN dnf install -y \ pip install pynvim # install lsp and liners using mason -RUN nvim --headless +"MasonInstall \ +RUN nvim --headless +TSUpdateSync +"MasonInstall \ bash-language-server \ css-lsp \ cssmodules-language-server \ diff --git a/README.md b/README.md index 4b2b4b8..d413b2e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# My personal nvim configuration +# My personal **neovim as container** configuration I made this public so I can easily clone without authentication, but since I treat this as a personal use only stuff, @@ -9,7 +9,7 @@ Those repos are obviously listed in plugin setup part. # Basic usage of this config -

Tested only with rootless podman, docker might require additional setup, or proper in-container user setup

+

**Tested only with rootless podman, docker might require additional setup, or proper in-container user setup**

### Host system Setup @@ -72,6 +72,7 @@ function nvim() { -e XDG_RUNTIME_DIR=/runtime_dir \ -e WAYLAND_DISPLAY=$WAYLAND_DISPLAY \ -v $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/runtime_dir/$WAYLAND_DISPLAY \ + -v ~/.local/share/nvim/sessions:/root/.local/share/nvim/sessions \ $MOUNT_FILE \ $MOUNT_FOLDER \ neovim:latest "$@" diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index f221e06..0838a58 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -1,10 +1,10 @@ return function() require 'nvim-treesitter.configs'.setup { -- A list of parser names, or "all" - --ensure_installed = { "html", "dockerfile", "cpp", "css", "markdown", "c", "gitcommit", "bash", "phpdoc", "comment", "python", "http", "php", "regex", "json5", "lua", "gitattributes", "gitignore", "json", "git_rebase", "javascript", "perl", "sql", "yaml" }, + ensure_installed = { "html", "dockerfile", "cpp", "css", "markdown", "c", "gitcommit", "bash", "phpdoc", "comment", "python", "http", "php", "regex", "json5", "lua", "gitattributes", "gitignore", "json", "git_rebase", "javascript", "perl", "sql", "yaml" }, -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, + sync_install = true, -- Automatically install missing parsers when entering buffer -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally