Compare commits

...

10 commits

Author SHA1 Message Date
Szwendacz
636942d6bc add helm lsp 2024-01-17 16:40:05 +01:00
Szwendacz
adfc5e7489 mount shada dir, treesitter reverse/fix 2024-01-15 13:43:50 +01:00
Maciej Lebiest
9dc0b5db5a more treesitter conf adjustments for nvim-in-container workflow 2024-01-13 21:09:21 +01:00
Maciej Lebiest
18d319ad46 fix building Containerfile 2024-01-13 09:00:44 +01:00
Maciej Lebiest
7f244b2ace fix treesitter on start 2024-01-13 08:58:00 +01:00
Szwendacz
26ab69834f bashrc cleaning 2024-01-12 10:44:25 +01:00
Maciej Lebiest
e92a7ee2c5 make Telescope grep hidden files 2024-01-11 21:45:14 +01:00
Szwendacz
3662e70092 yamls add kubernetes yaml globs 2024-01-04 12:37:23 +01:00
Maciej Lebiest
3cac886e40 reduce build frequency 2023-12-31 10:47:43 +01:00
Maciej Lebiest
5ca9a32725 remove ruby, R 2023-12-28 19:17:49 +01:00
6 changed files with 82 additions and 32 deletions

View file

@ -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

View file

@ -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" ]

View file

@ -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:

View file

@ -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

View file

@ -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
}

View file

@ -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
},
},
}
}