Compare commits
10 commits
746c80cef2
...
636942d6bc
Author | SHA1 | Date | |
---|---|---|---|
|
636942d6bc | ||
|
adfc5e7489 | ||
|
9dc0b5db5a | ||
|
18d319ad46 | ||
|
7f244b2ace | ||
|
26ab69834f | ||
|
e92a7ee2c5 | ||
|
3662e70092 | ||
|
3cac886e40 | ||
|
5ca9a32725 |
6 changed files with 82 additions and 32 deletions
|
@ -4,7 +4,7 @@ on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '30 3 */3 * *'
|
- cron: '30 3 */10 * *'
|
||||||
|
|
||||||
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 . --file Dockerfile --tag gitea.maciej.cloud/packages/neovim:arm64
|
podman build . --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 . --file Dockerfile --tag gitea.maciej.cloud/packages/neovim:amd64
|
podman build . --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
|
||||||
|
|
|
@ -27,10 +27,6 @@ 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 \
|
||||||
|
@ -50,19 +46,16 @@ ENV MASON_PKGS=" \
|
||||||
sqlls \
|
sqlls \
|
||||||
typescript-language-server \
|
typescript-language-server \
|
||||||
yaml-language-server \
|
yaml-language-server \
|
||||||
markdownlint\
|
markdownlint \
|
||||||
ansible-language-server \
|
ansible-language-server \
|
||||||
standardrb \
|
helm-ls"
|
||||||
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} ${R_DEVEL_PKGS} ${RUBY_DEVEL_PKGS} ${BUILD_ONLY_PKGS} && \
|
${GENERAL_PKGS} ${NEOVIM_PKGS} ${PYTHON_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 && \
|
||||||
|
@ -70,21 +63,13 @@ 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 +TSUpdateSync \
|
RUN nvim --headless '+TSInstall all' \
|
||||||
+"MasonInstall ${MASON_PKGS}" \
|
+"MasonInstall ${MASON_PKGS}" \
|
||||||
+qa ; \
|
+qa ; \
|
||||||
nvim --headless +TSUpdateSync \
|
nvim --headless '+TSInstall all' \
|
||||||
+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/key-bindings.bash ] && source /usr/share/fzf/key-bindings.bash \n\
|
RUN echo '[ -f /usr/share/fzf/shell/key-bindings.bash ] && source /usr/share/fzf/shell/key-bindings.bash' >> /root/.bashrc
|
||||||
[ -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" ]
|
30
README.md
30
README.md
|
@ -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/main.shada:/root/.local/state/nvim/shada/main.shada:rw \
|
-v ~/.local/state/nvim/shada/:/root/.local/state/nvim/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/main.shada:/root/.local/state/nvim/shada/main.shada:rw \
|
-v ~/.local/state/nvim/shada/:/root/.local/state/nvim/shada/:rw \
|
||||||
"${MOUNT_FILE[@]}" \
|
"${MOUNT_FILE[@]}" \
|
||||||
"${MOUNT_FOLDER[@]}" \
|
"${MOUNT_FOLDER[@]}" \
|
||||||
--entrypoint bash \
|
--entrypoint bash \
|
||||||
|
@ -183,6 +183,16 @@ 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
|
||||||
|
@ -265,6 +275,14 @@ 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:
|
||||||
|
|
|
@ -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',
|
--build = ':TSUpdate', -- not needed in Container workflow
|
||||||
priority = 400
|
priority = 400
|
||||||
},
|
},
|
||||||
-- neovim lsp plugins and depencencies
|
-- neovim lsp plugins and depencencies
|
||||||
|
|
|
@ -189,6 +189,11 @@ 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 {
|
||||||
|
@ -224,5 +229,9 @@ 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
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,5 +5,43 @@ 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
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue