Compare commits

..

No commits in common. "636942d6bc268bd0f43618f5176db4fdea7ddcbf" and "746c80cef23acec5e31cf975485eb7724c44be14" have entirely different histories.

6 changed files with 32 additions and 82 deletions

View file

@ -4,7 +4,7 @@ on:
push: push:
branches: [ "main" ] branches: [ "main" ]
schedule: schedule:
- cron: '30 3 */10 * *' - cron: '30 3 */3 * *'
jobs: jobs:
build-neovim-arm64: build-neovim-arm64:
@ -16,7 +16,7 @@ jobs:
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v3 uses: actions/checkout@v3
- run: | - run: |
podman build . --tag gitea.maciej.cloud/packages/neovim:arm64 podman build . --file Dockerfile --tag gitea.maciej.cloud/packages/neovim:arm64
- name: login to registry - name: login to registry
run: | run: |
podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" gitea.maciej.cloud podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" gitea.maciej.cloud
@ -41,7 +41,7 @@ jobs:
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v3 uses: actions/checkout@v3
- run: | - run: |
podman build . --tag gitea.maciej.cloud/packages/neovim:amd64 podman build . --file Dockerfile --tag gitea.maciej.cloud/packages/neovim:amd64
- name: login to registry - name: login to registry
run: | run: |
podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" gitea.maciej.cloud podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" gitea.maciej.cloud

View file

@ -27,6 +27,10 @@ ENV PYTHON_DEVEL_PKGS="\
ENV BUILD_ONLY_PKGS="python3-devel" ENV BUILD_ONLY_PKGS="python3-devel"
ENV R_DEVEL_PKGS="R-core R-core-devel cmake"
ENV RUBY_DEVEL_PKGS="ruby-devel rubygems"
ENV MASON_PKGS=" \ ENV MASON_PKGS=" \
bash-language-server \ bash-language-server \
css-lsp \ css-lsp \
@ -48,14 +52,17 @@ ENV MASON_PKGS=" \
yaml-language-server \ yaml-language-server \
markdownlint\ markdownlint\
ansible-language-server \ ansible-language-server \
helm-ls" standardrb \
ruby-lsp \
solargraph"
ENV PIP_PKGS="pynvim ansible ansible-lint" ENV PIP_PKGS="pynvim ansible ansible-lint"
COPY . /root/.config/nvim COPY . /root/.config/nvim
# install system dependencies # install system dependencies
RUN dnf install -y \ RUN dnf install -y \
${GENERAL_PKGS} ${NEOVIM_PKGS} ${PYTHON_DEVEL_PKGS} ${BUILD_ONLY_PKGS} && \ ${GENERAL_PKGS} ${NEOVIM_PKGS} ${PYTHON_DEVEL_PKGS} ${R_DEVEL_PKGS} ${RUBY_DEVEL_PKGS} ${BUILD_ONLY_PKGS} && \
R -e 'install.packages("languageserver", repos = "http://cran.us.r-project.org")' && \
pip install ${PIP_PKGS} && \ pip install ${PIP_PKGS} && \
dnf remove -y ${BUILD_ONLY_PKGS} && \ dnf remove -y ${BUILD_ONLY_PKGS} && \
dnf -y autoremove && \ dnf -y autoremove && \
@ -63,13 +70,21 @@ RUN dnf install -y \
RUN rm /root/.config/nvim/lazy-lock.json || true RUN rm /root/.config/nvim/lazy-lock.json || true
# install lsp and linters using mason # install lsp and linters using mason
RUN nvim --headless '+TSInstall all' \ RUN nvim --headless +TSUpdateSync \
+"MasonInstall ${MASON_PKGS}" \ +"MasonInstall ${MASON_PKGS}" \
+qa ; \ +qa ; \
nvim --headless '+TSInstall all' \ nvim --headless +TSUpdateSync \
+qa; \
nvim --headless +TSUpdateSync \
+qa; \
nvim --headless +TSUpdateSync \
+qa; \
nvim --headless +TSUpdateSync \
+qa; \ +qa; \
chown -R root:root /root/.local/share/nvim/mason/packages/sqlls/node_modules/sql-language-server/ chown -R root:root /root/.local/share/nvim/mason/packages/sqlls/node_modules/sql-language-server/
RUN echo '[ -f /usr/share/fzf/shell/key-bindings.bash ] && source /usr/share/fzf/shell/key-bindings.bash' >> /root/.bashrc RUN echo $'[ -f /usr/share/fzf/key-bindings.bash ] && source /usr/share/fzf/key-bindings.bash \n\
[ -f /usr/share/fzf/shell/key-bindings.bash ] && source /usr/share/fzf/shell/key-bindings.bash \n\
[ -f /usr/share/fzf/completion.bash ] && source /usr/share/fzf/completion.bash' >> /root/.bashrc
ENTRYPOINT [ "/usr/bin/nvim" ] ENTRYPOINT [ "/usr/bin/nvim" ]

View file

@ -89,17 +89,17 @@ function nvim() {
local MOUNT_FOLDER=(--workdir "/data$base_path" -v "$base_path:/data$base_path:rw") local MOUNT_FOLDER=(--workdir "/data$base_path" -v "$base_path:/data$base_path:rw")
fi fi
# make sure there is a folder for sessions on default path # make sure there is a folder for sessions on default path
mkdir -p ~/.local/share/nvim/sessions ~/.local/state/nvim/shada mkdir -p ~/.local/share/nvim/sessions ~/.local/state/nvim/shada/
touch ~/.local/state/nvim/shada/main.shada
echo "Files mount options: ${MOUNT_FILE[*]}" echo "Files mount options: ${MOUNT_FILE[*]}"
echo "Folder mount options: ${MOUNT_FOLDER[*]}" echo "Folder mount options: ${MOUNT_FOLDER[*]}"
podman run --privileged -it --rm \ podman run --privileged -it --rm \
--network host \
-e XDG_RUNTIME_DIR=/runtime_dir \ -e XDG_RUNTIME_DIR=/runtime_dir \
-e WAYLAND_DISPLAY="$WAYLAND_DISPLAY" \ -e WAYLAND_DISPLAY="$WAYLAND_DISPLAY" \
-v "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/runtime_dir/$WAYLAND_DISPLAY:rw" \ -v "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/runtime_dir/$WAYLAND_DISPLAY:rw" \
-v ~/.local/share/nvim/sessions:/root/.local/share/nvim/sessions:rw \ -v ~/.local/share/nvim/sessions:/root/.local/share/nvim/sessions:rw \
-v ~/.local/state/nvim/shada/:/root/.local/state/nvim/shada/:rw \ -v ~/.local/state/nvim/shada/main.shada:/root/.local/state/nvim/shada/main.shada:rw \
"${MOUNT_FILE[@]}" \ "${MOUNT_FILE[@]}" \
"${MOUNT_FOLDER[@]}" \ "${MOUNT_FOLDER[@]}" \
neovim:latest "$@" neovim:latest "$@"
@ -140,17 +140,17 @@ function nvim_project() {
local MOUNT_FOLDER=(--workdir "/data$base_path" -v "$base_path:/data$base_path:rw") local MOUNT_FOLDER=(--workdir "/data$base_path" -v "$base_path:/data$base_path:rw")
fi fi
# make sure there is a folder for sessions on default path # make sure there is a folder for sessions on default path
mkdir -p ~/.local/share/nvim/sessions ~/.local/state/nvim/shada mkdir -p ~/.local/share/nvim/sessions ~/.local/state/nvim/shada/
touch ~/.local/state/nvim/shada/main.shada
echo "Files mount options: ${MOUNT_FILE[*]}" echo "Files mount options: ${MOUNT_FILE[*]}"
echo "Folder mount options: ${MOUNT_FOLDER[*]}" echo "Folder mount options: ${MOUNT_FOLDER[*]}"
podman run --privileged -it \ podman run --privileged -it \
--network host \
-e XDG_RUNTIME_DIR=/runtime_dir \ -e XDG_RUNTIME_DIR=/runtime_dir \
-e WAYLAND_DISPLAY="$WAYLAND_DISPLAY" \ -e WAYLAND_DISPLAY="$WAYLAND_DISPLAY" \
-v "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/runtime_dir/$WAYLAND_DISPLAY:rw" \ -v "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/runtime_dir/$WAYLAND_DISPLAY:rw" \
-v ~/.local/share/nvim/sessions:/root/.local/share/nvim/sessions:rw \ -v ~/.local/share/nvim/sessions:/root/.local/share/nvim/sessions:rw \
-v ~/.local/state/nvim/shada/:/root/.local/state/nvim/shada/:rw \ -v ~/.local/state/nvim/shada/main.shada:/root/.local/state/nvim/shada/main.shada:rw \
"${MOUNT_FILE[@]}" \ "${MOUNT_FILE[@]}" \
"${MOUNT_FOLDER[@]}" \ "${MOUNT_FOLDER[@]}" \
--entrypoint bash \ --entrypoint bash \
@ -183,16 +183,6 @@ And then in neovim:
:MasonInstall perlnavigator :MasonInstall perlnavigator
``` ```
### Ruby
```bash
dnf install -y ruby-devel rubygems
```
```bash
:MasonInstall standardrb ruby-lsp solargraph
```
## Inside vim ## Inside vim
```vim ```vim
@ -275,14 +265,6 @@ All that is saved in image, so that is why image is so heavy.
|Ctrl+v | Open selection as a vsplit| |Ctrl+v | Open selection as a vsplit|
|Ctrl+t | Open selection in new tab | |Ctrl+t | Open selection in new tab |
##### Usefull Telescope commands
Find files including hidden
```bash
Telescope find_files hidden=true
```
#### Markdown Preview #### Markdown Preview
Mardkown Preview plugin commands: Mardkown Preview plugin commands:

View file

@ -17,7 +17,7 @@ require("lazy").setup({
-- treesitter need to be configured after load, -- treesitter need to be configured after load,
-- so let here be init, not config -- so let here be init, not config
init = require('plugins.treesitter'), init = require('plugins.treesitter'),
--build = ':TSUpdate', -- not needed in Container workflow build = ':TSUpdate',
priority = 400 priority = 400
}, },
-- neovim lsp plugins and depencencies -- neovim lsp plugins and depencencies

View file

@ -189,11 +189,6 @@ return {
require 'lspconfig'.yamlls.setup { require 'lspconfig'.yamlls.setup {
on_attach = on_attach, on_attach = on_attach,
capabilities = capabilities, capabilities = capabilities,
settings = {
yaml = {
schemas = { kubernetes = "*{deployment,cron,service,volume,secret,ingress,svc,pvc}*.yaml" },
}
}
} }
require 'lspconfig'.lemminx.setup { require 'lspconfig'.lemminx.setup {
@ -229,9 +224,5 @@ return {
on_attach = on_attach, on_attach = on_attach,
capabilities = capabilities, capabilities = capabilities,
} }
require 'lspconfig'.helm_ls.setup {
on_attach = on_attach,
capabilities = capabilities,
}
end end
} }

View file

@ -5,43 +5,5 @@ return {
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {}) vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {}) vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {}) vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
require('telescope').setup {
defaults = {
vimgrep_arguments = {
'rg',
'--color=never',
'--no-heading',
'--with-filename',
'--line-number',
'--column',
'--smart-case',
'--no-ignore',
'--hidden',
'--glob',
'!{**/.git/*,**/node_modules/*,**/package-lock.json,**/yarn.lock}',
},
} }
end,
opts = {
--defaults = {
--vimgrep_arguments = {
--'rg',
--'--color=never',
--'--no-heading',
--'--with-filename',
--'--line-number',
--'--column',
--'--smart-case',
--'--no-ignore',
----'--hidden',
--}
--},
pickers = {
live_grep = {
additional_args = function(opts)
return { "--hidden" }
end end
},
},
}
} }