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:
|
||||
branches: [ "main" ]
|
||||
schedule:
|
||||
- cron: '30 3 */3 * *'
|
||||
- cron: '30 3 */10 * *'
|
||||
|
||||
jobs:
|
||||
build-neovim-arm64:
|
||||
|
@ -16,7 +16,7 @@ jobs:
|
|||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- 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
|
||||
run: |
|
||||
podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" gitea.maciej.cloud
|
||||
|
@ -41,7 +41,7 @@ jobs:
|
|||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- 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
|
||||
run: |
|
||||
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 R_DEVEL_PKGS="R-core R-core-devel cmake"
|
||||
|
||||
ENV RUBY_DEVEL_PKGS="ruby-devel rubygems"
|
||||
|
||||
ENV MASON_PKGS=" \
|
||||
bash-language-server \
|
||||
css-lsp \
|
||||
|
@ -50,19 +46,16 @@ ENV MASON_PKGS=" \
|
|||
sqlls \
|
||||
typescript-language-server \
|
||||
yaml-language-server \
|
||||
markdownlint\
|
||||
markdownlint \
|
||||
ansible-language-server \
|
||||
standardrb \
|
||||
ruby-lsp \
|
||||
solargraph"
|
||||
helm-ls"
|
||||
|
||||
ENV PIP_PKGS="pynvim ansible ansible-lint"
|
||||
|
||||
COPY . /root/.config/nvim
|
||||
# install system dependencies
|
||||
RUN dnf install -y \
|
||||
${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")' && \
|
||||
${GENERAL_PKGS} ${NEOVIM_PKGS} ${PYTHON_DEVEL_PKGS} ${BUILD_ONLY_PKGS} && \
|
||||
pip install ${PIP_PKGS} && \
|
||||
dnf remove -y ${BUILD_ONLY_PKGS} && \
|
||||
dnf -y autoremove && \
|
||||
|
@ -70,21 +63,13 @@ RUN dnf install -y \
|
|||
|
||||
RUN rm /root/.config/nvim/lazy-lock.json || true
|
||||
# install lsp and linters using mason
|
||||
RUN nvim --headless +TSUpdateSync \
|
||||
RUN nvim --headless '+TSInstall all' \
|
||||
+"MasonInstall ${MASON_PKGS}" \
|
||||
+qa ; \
|
||||
nvim --headless +TSUpdateSync \
|
||||
+qa; \
|
||||
nvim --headless +TSUpdateSync \
|
||||
+qa; \
|
||||
nvim --headless +TSUpdateSync \
|
||||
+qa; \
|
||||
nvim --headless +TSUpdateSync \
|
||||
nvim --headless '+TSInstall all' \
|
||||
+qa; \
|
||||
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\
|
||||
[ -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
|
||||
RUN echo '[ -f /usr/share/fzf/shell/key-bindings.bash ] && source /usr/share/fzf/shell/key-bindings.bash' >> /root/.bashrc
|
||||
|
||||
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")
|
||||
fi
|
||||
# make sure there is a folder for sessions on default path
|
||||
mkdir -p ~/.local/share/nvim/sessions ~/.local/state/nvim/shada/
|
||||
touch ~/.local/state/nvim/shada/main.shada
|
||||
mkdir -p ~/.local/share/nvim/sessions ~/.local/state/nvim/shada
|
||||
|
||||
echo "Files mount options: ${MOUNT_FILE[*]}"
|
||||
echo "Folder mount options: ${MOUNT_FOLDER[*]}"
|
||||
podman run --privileged -it --rm \
|
||||
--network host \
|
||||
-e XDG_RUNTIME_DIR=/runtime_dir \
|
||||
-e WAYLAND_DISPLAY="$WAYLAND_DISPLAY" \
|
||||
-v "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/runtime_dir/$WAYLAND_DISPLAY: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_FOLDER[@]}" \
|
||||
neovim:latest "$@"
|
||||
|
@ -140,17 +140,17 @@ function nvim_project() {
|
|||
local MOUNT_FOLDER=(--workdir "/data$base_path" -v "$base_path:/data$base_path:rw")
|
||||
fi
|
||||
# make sure there is a folder for sessions on default path
|
||||
mkdir -p ~/.local/share/nvim/sessions ~/.local/state/nvim/shada/
|
||||
touch ~/.local/state/nvim/shada/main.shada
|
||||
mkdir -p ~/.local/share/nvim/sessions ~/.local/state/nvim/shada
|
||||
|
||||
echo "Files mount options: ${MOUNT_FILE[*]}"
|
||||
echo "Folder mount options: ${MOUNT_FOLDER[*]}"
|
||||
podman run --privileged -it \
|
||||
--network host \
|
||||
-e XDG_RUNTIME_DIR=/runtime_dir \
|
||||
-e WAYLAND_DISPLAY="$WAYLAND_DISPLAY" \
|
||||
-v "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/runtime_dir/$WAYLAND_DISPLAY: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_FOLDER[@]}" \
|
||||
--entrypoint bash \
|
||||
|
@ -183,6 +183,16 @@ And then in neovim:
|
|||
:MasonInstall perlnavigator
|
||||
```
|
||||
|
||||
### Ruby
|
||||
|
||||
```bash
|
||||
dnf install -y ruby-devel rubygems
|
||||
```
|
||||
|
||||
```bash
|
||||
:MasonInstall standardrb ruby-lsp solargraph
|
||||
```
|
||||
|
||||
## Inside 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+t | Open selection in new tab |
|
||||
|
||||
##### Usefull Telescope commands
|
||||
|
||||
Find files including hidden
|
||||
|
||||
```bash
|
||||
Telescope find_files hidden=true
|
||||
```
|
||||
|
||||
#### Markdown Preview
|
||||
|
||||
Mardkown Preview plugin commands:
|
||||
|
|
|
@ -17,7 +17,7 @@ require("lazy").setup({
|
|||
-- treesitter need to be configured after load,
|
||||
-- so let here be init, not config
|
||||
init = require('plugins.treesitter'),
|
||||
build = ':TSUpdate',
|
||||
--build = ':TSUpdate', -- not needed in Container workflow
|
||||
priority = 400
|
||||
},
|
||||
-- neovim lsp plugins and depencencies
|
||||
|
|
|
@ -189,6 +189,11 @@ return {
|
|||
require 'lspconfig'.yamlls.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
yaml = {
|
||||
schemas = { kubernetes = "*{deployment,cron,service,volume,secret,ingress,svc,pvc}*.yaml" },
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
require 'lspconfig'.lemminx.setup {
|
||||
|
@ -224,5 +229,9 @@ return {
|
|||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
require 'lspconfig'.helm_ls.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
end
|
||||
}
|
||||
|
|
|
@ -5,5 +5,43 @@ return {
|
|||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
|
||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
|
||||
end
|
||||
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
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue