diff --git a/Dockerfile b/Dockerfile index 1948b14..fda7a6e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -180,6 +180,7 @@ RUN \ chown -R ${UNAME}:${GNAME} /home/${UNAME} USER ${UNAME} +WORKDIR /home/${UNAME} ENV \ GID="1000" \ @@ -195,39 +196,13 @@ ENV \ UID="1000" \ UNAME="neovim" -RUN \ - curl -fsSL https://cli.kiro.dev/install | bash - -RUN \ - curl -fsSL https://chatgpt.com/codex/install.sh | bash - RUN \ if [ "$NV_DARCULA_ENABLE_COC" = "true" ]; then \ - nvim --headless "+CocInstall -sync coc-calc" "+qall" && \ - nvim --headless "+CocInstall -sync coc-clang-format-style-options" "+qall" && \ - nvim --headless "+CocInstall -sync coc-clangd" "+qall" && \ - nvim --headless "+CocInstall -sync coc-cmake" "+qall" && \ - nvim --headless "+CocInstall -sync coc-css" "+qall" && \ - nvim --headless "+CocInstall -sync coc-eslint" "+qall" && \ - nvim --headless "+CocInstall -sync coc-flutter" "+qall" && \ - nvim --headless "+CocInstall -sync coc-go" "+qall" && \ - nvim --headless "+CocInstall -sync coc-highlight" "+qall" && \ - nvim --headless "+CocInstall -sync coc-html" "+qall" && \ - nvim --headless "+CocInstall -sync coc-java" "+qall" && \ - nvim --headless "+CocInstall -sync coc-jedi" "+qall" && \ - nvim --headless "+CocInstall -sync coc-jest" "+qall" && \ - nvim --headless "+CocInstall -sync coc-json" "+qall" && \ - nvim --headless "+CocInstall -sync coc-lightbulb" "+qall" && \ - nvim --headless "+CocInstall -sync coc-markdownlint" "+qall" && \ - nvim --headless "+CocInstall -sync coc-omnisharp" "+qall" && \ - nvim --headless "+CocInstall -sync coc-powershell" "+qall" && \ - nvim --headless "+CocInstall -sync coc-react-refactor" "+qall" && \ - nvim --headless "+CocInstall -sync coc-sh" "+qall" && \ - nvim --headless "+CocInstall -sync coc-snippets" "+qall" && \ - nvim --headless "+CocInstall -sync coc-spell-checker" "+qall" && \ nvim --headless "+CocInstall -sync coc-sumneko-lua" "+qall" && \ - nvim --headless "+CocInstall -sync coc-tsserver" "+qall" && \ - nvim --headless "+CocInstall -sync coc-vimlsp" "+qall" && \ + nvim --headless -i NONE \ + --cmd "set loadplugins" \ + -u /home/neovim/.config/nvim/init.lua \ + -l /home/neovim/.config/nvim/lua/darcula/install_coc_extensions.lua && \ nvim --headless init.lua +CocStart \ "+lua vim.defer_fn(function() vim.cmd('CocCommand sumneko-lua.install') end, 5000)" \ "+lua vim.defer_fn(function() vim.cmd('qall') end, 15000)" && \ @@ -247,6 +222,12 @@ RUN \ RUN \ nvim --headless "+MasonToolsInstallSync" "+qall" +RUN \ + curl -fsSL https://chatgpt.com/codex/install.sh | bash + +RUN \ + curl -fsSL https://cli.kiro.dev/install | bash + RUN \ cd "/home/${UNAME}" && \ git clone https://github.com/flutter/flutter.git -b stable flutter && \ diff --git a/nvim/lua/darcula/install_coc_extensions.lua b/nvim/lua/darcula/install_coc_extensions.lua new file mode 100644 index 0000000..64ac409 --- /dev/null +++ b/nvim/lua/darcula/install_coc_extensions.lua @@ -0,0 +1,51 @@ +-- The MIT License (MIT) +-- +-- Copyright © 2026 Scott E. Graves +-- +-- Permission is hereby granted, free of charge, to any person obtaining a copy of this software +-- and associated documentation files (the “Software”), to deal in the Software without restriction, +-- including without limitation the rights to use, copy, modify, merge, publish, distribute, +-- sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is +-- furnished to do so, subject to the following conditions: +-- +-- The above copyright notice and this permission notice shall be included in all copies or +-- substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +-- BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +-- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +-- + +if NV_DARCULA_ENABLE_COC then + assert(vim.fn.exists(":CocInstall") == 2, ":CocInstall is unavailable") + + for index, extension in ipairs(NV_DARCULA_COC_EXTENSIONS) do + print( + string.format( + "Installing CoC extension %d/%d: %s", + index, + #NV_DARCULA_COC_EXTENSIONS, + extension + ) + ) + + local ok, err = + pcall( + vim.api.nvim_cmd, + { + cmd = "CocInstall", + args = {"-sync", extension} + }, + {} + ) + + if not ok then + error( + string.format("Failed to install CoC extension %s: %s", extension, err), + 0 + ) + end + end +end