diff --git a/editors/neovim/bootstrap.sh b/editors/neovim/bootstrap.sh index c7fe4191..5c81f698 100755 --- a/editors/neovim/bootstrap.sh +++ b/editors/neovim/bootstrap.sh @@ -15,7 +15,7 @@ else fi (cd ../.. && docker build -t myriaddreamin/tinymist:0.13.14 .) -docker build -t myriaddreamin/tinymist-nvim:0.13.14 . +(cd samples && docker build -t myriaddreamin/tinymist-nvim:0.13.14 -f lazyvim-dev/Dockerfile .) docker run --rm -it \ -v $PWD/../../tests/workspaces:/home/runner/dev/workspaces \ -v $PWD:/home/runner/dev \ diff --git a/editors/neovim/config/autocmds.lua b/editors/neovim/config/autocmds.lua deleted file mode 100644 index 48a1f0f0..00000000 --- a/editors/neovim/config/autocmds.lua +++ /dev/null @@ -1,17 +0,0 @@ --- Autocmds are automatically loaded on the VeryLazy event --- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua --- Add any additional autocmds here - -vim.api.nvim_create_autocmd( - { - "BufNewFile", - "BufRead", - }, - { - pattern = "*.typ", - callback = function() - local buf = vim.api.nvim_get_current_buf() - vim.api.nvim_buf_set_option(buf, "filetype", "typst") - end - } -) diff --git a/editors/neovim/Dockerfile b/editors/neovim/samples/lazyvim-dev/Dockerfile similarity index 81% rename from editors/neovim/Dockerfile rename to editors/neovim/samples/lazyvim-dev/Dockerfile index 32133a94..ba5839e6 100644 --- a/editors/neovim/Dockerfile +++ b/editors/neovim/samples/lazyvim-dev/Dockerfile @@ -38,11 +38,11 @@ ENV XDG_DATA_HOME=/home/runner/.local/share ENV XDG_STATE_HOME=/home/runner/.local/state ENV XDG_CACHE_HOME=/home/runner/.cache -COPY init.lua $XDG_CONFIG_HOME/nvim/init.lua -COPY plugins/dev.lua $XDG_CONFIG_HOME/nvim/lua/plugins/dev.lua -COPY plugins/lsp-folding.lua $XDG_CONFIG_HOME/nvim/lua/plugins/lsp-folding.lua -COPY plugins/mason-workaround.lua $XDG_CONFIG_HOME/nvim/lua/plugins/mason-workaround.lua -COPY plugins/tinymist.lua $XDG_CONFIG_HOME/nvim/lua/others/tinymist.lua +COPY lazyvim-dev/init.lua $XDG_CONFIG_HOME/nvim/init.lua +COPY lazyvim-dev/plugins/dev.lua $XDG_CONFIG_HOME/nvim/lua/plugins/dev.lua +COPY lazyvim-dev/plugins/mason-workaround.lua $XDG_CONFIG_HOME/nvim/lua/plugins/mason-workaround.lua +COPY lazyvim/plugins/lsp-folding.lua $XDG_CONFIG_HOME/nvim/lua/plugins/lsp-folding.lua +COPY lazyvim/plugins/tinymist.lua $XDG_CONFIG_HOME/nvim/lua/others/tinymist.lua # SHELL isn't supported by OCI images ENTRYPOINT [] diff --git a/editors/neovim/samples/lazyvim-dev/README.md b/editors/neovim/samples/lazyvim-dev/README.md new file mode 100644 index 00000000..ec7910c8 --- /dev/null +++ b/editors/neovim/samples/lazyvim-dev/README.md @@ -0,0 +1,3 @@ + +This is a minimal settings that bootstraps neovim editor for *development*. + diff --git a/editors/neovim/init.lua b/editors/neovim/samples/lazyvim-dev/init.lua similarity index 98% rename from editors/neovim/init.lua rename to editors/neovim/samples/lazyvim-dev/init.lua index c3c1356c..0d642abf 100644 --- a/editors/neovim/init.lua +++ b/editors/neovim/samples/lazyvim-dev/init.lua @@ -52,9 +52,6 @@ if vim.env.SSH_TTY ~= nil then } end --- important for running LSP servers --- vim.lsp.enable('tinymist') - vim.api.nvim_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", { noremap = true, silent = true }) require("lazy").setup({ diff --git a/editors/neovim/plugins/dev.lua b/editors/neovim/samples/lazyvim-dev/plugins/dev.lua similarity index 100% rename from editors/neovim/plugins/dev.lua rename to editors/neovim/samples/lazyvim-dev/plugins/dev.lua diff --git a/editors/neovim/plugins/mason-workaround.lua b/editors/neovim/samples/lazyvim-dev/plugins/mason-workaround.lua similarity index 100% rename from editors/neovim/plugins/mason-workaround.lua rename to editors/neovim/samples/lazyvim-dev/plugins/mason-workaround.lua diff --git a/editors/neovim/plugins/lsp-folding.lua b/editors/neovim/samples/lazyvim/plugins/lsp-folding.lua similarity index 100% rename from editors/neovim/plugins/lsp-folding.lua rename to editors/neovim/samples/lazyvim/plugins/lsp-folding.lua diff --git a/editors/neovim/plugins/tinymist.lua b/editors/neovim/samples/lazyvim/plugins/tinymist.lua similarity index 100% rename from editors/neovim/plugins/tinymist.lua rename to editors/neovim/samples/lazyvim/plugins/tinymist.lua diff --git a/editors/nixvim/README.md b/editors/neovim/samples/nixvim/README.md similarity index 100% rename from editors/nixvim/README.md rename to editors/neovim/samples/nixvim/README.md diff --git a/editors/nixvim/config/bufferline.nix b/editors/neovim/samples/nixvim/config/bufferline.nix similarity index 100% rename from editors/nixvim/config/bufferline.nix rename to editors/neovim/samples/nixvim/config/bufferline.nix diff --git a/editors/nixvim/config/default.nix b/editors/neovim/samples/nixvim/config/default.nix similarity index 100% rename from editors/nixvim/config/default.nix rename to editors/neovim/samples/nixvim/config/default.nix diff --git a/editors/nixvim/config/tinymist.nix b/editors/neovim/samples/nixvim/config/tinymist.nix similarity index 100% rename from editors/nixvim/config/tinymist.nix rename to editors/neovim/samples/nixvim/config/tinymist.nix diff --git a/editors/nixvim/config/typst-preview.nix b/editors/neovim/samples/nixvim/config/typst-preview.nix similarity index 100% rename from editors/nixvim/config/typst-preview.nix rename to editors/neovim/samples/nixvim/config/typst-preview.nix diff --git a/editors/nixvim/config/typst-vim.nix b/editors/neovim/samples/nixvim/config/typst-vim.nix similarity index 100% rename from editors/nixvim/config/typst-vim.nix rename to editors/neovim/samples/nixvim/config/typst-vim.nix diff --git a/editors/nixvim/flake.nix b/editors/neovim/samples/nixvim/flake.nix similarity index 100% rename from editors/nixvim/flake.nix rename to editors/neovim/samples/nixvim/flake.nix diff --git a/flake.nix b/flake.nix index fff7fdae..3ab92404 100644 --- a/flake.nix +++ b/flake.nix @@ -5,8 +5,8 @@ flake-parts.url = "github:hercules-ci/flake-parts"; tinymist-unstable.url = "path:contrib/nix/unstable"; - tinymist-dev.url = "path:././././././././contrib/nix/dev"; - tinymist-nixvim.url = "path:editors/nixvim"; + tinymist-dev.url = "path:contrib/nix/dev"; + tinymist-nixvim.url = "path:editors/neovim/samples/nixvim"; }; outputs = inputs@{