more formatters, some cleaning
This commit is contained in:
parent
4653116fac
commit
97b8a1a802
4 changed files with 120 additions and 192 deletions
|
@ -44,17 +44,19 @@ ENV MASON_PKGS=" \
|
||||||
markdownlint \
|
markdownlint \
|
||||||
ansible-language-server \
|
ansible-language-server \
|
||||||
ansible-lint \
|
ansible-lint \
|
||||||
yamlfmt"
|
yamlfmt \
|
||||||
|
mdformat \
|
||||||
|
shfmt"
|
||||||
|
|
||||||
ENV MASON_PKGS_NO_ARM="lemminx helm-ls lua-language-server"
|
ENV MASON_PKGS_NO_ARM="lemminx helm-ls lua-language-server"
|
||||||
|
|
||||||
|
|
||||||
COPY . /root/.config/nvim
|
COPY . /root/.config/nvim
|
||||||
# install system dependencies
|
# install system dependencies
|
||||||
RUN dnf5 install -y \
|
RUN dnf install -y \
|
||||||
${GENERAL_PKGS} ${NEOVIM_PKGS} ${PYTHON_DEVEL_PKGS} ${BUILD_ONLY_PKGS} && \
|
${GENERAL_PKGS} ${NEOVIM_PKGS} ${PYTHON_DEVEL_PKGS} ${BUILD_ONLY_PKGS} && \
|
||||||
dnf5 -y autoremove && \
|
dnf -y autoremove && \
|
||||||
dnf5 clean all && \
|
dnf clean all && \
|
||||||
nvim --headless +"MasonInstall ${MASON_PKGS}" +qa || exit 1 ; \
|
nvim --headless +"MasonInstall ${MASON_PKGS}" +qa || exit 1 ; \
|
||||||
nvim --headless +"MasonInstall ${MASON_PKGS_NO_ARM}" +qa || true
|
nvim --headless +"MasonInstall ${MASON_PKGS_NO_ARM}" +qa || true
|
||||||
|
|
||||||
|
|
95
README.md
95
README.md
|
@ -1,7 +1,7 @@
|
||||||
# My personal **neovim as container** configuration
|
# My personal **neovim as container** configuration
|
||||||
|
|
||||||
I made this public so I can easily clone without authentication,
|
I made this public so I can easily clone without authentication,\
|
||||||
but since I treat this as a personal use only stuff,
|
but since I treat this as a personal use only stuff,\
|
||||||
there can be some(read "a lot of") messy stuff.
|
there can be some(read "a lot of") messy stuff.
|
||||||
|
|
||||||
Much of this might have been selectively copy pasted from plugin repos.
|
Much of this might have been selectively copy pasted from plugin repos.
|
||||||
|
@ -29,6 +29,7 @@ sudo dnf install -y \
|
||||||
```bash
|
```bash
|
||||||
podman pull ghcr.io/szwendacz99/neovim:latest
|
podman pull ghcr.io/szwendacz99/neovim:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
#### or build
|
#### or build
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -86,7 +87,7 @@ function nvim() {
|
||||||
local base_path="$(pwd)"
|
local base_path="$(pwd)"
|
||||||
|
|
||||||
# use list as a trick to allow paths with spaces
|
# use list as a trick to allow paths with spaces
|
||||||
local MOUNT_FOLDER=(--workdir "/data$base_path" -v "$base_path:/data$base_path:rw")
|
local MOUNT_FILE=(--workdir "/data$base_path" -v "$base_path:/data$base_path:rw")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$HOME/.gitconfig" ]; then
|
if [ -f "$HOME/.gitconfig" ]; then
|
||||||
|
@ -97,26 +98,30 @@ function nvim() {
|
||||||
local MOUNT_FILE=("${MOUNT_FILE[@]}" -v "$HOME/.ssh/known_hosts:/root/.ssh/known_hosts:ro")
|
local MOUNT_FILE=("${MOUNT_FILE[@]}" -v "$HOME/.ssh/known_hosts:/root/.ssh/known_hosts:ro")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -S "$XDG_RUNTIME_DIR/ssh-agent.socket" ]; then
|
if [ -d "$XDG_RUNTIME_DIR" ]; then
|
||||||
local MOUNT_FILE=("${MOUNT_FILE[@]}" -v "$XDG_RUNTIME_DIR/ssh-agent.socket:/runtime_dir/ssh-agent.socket:rw")
|
local MOUNT_FILE=("${MOUNT_FILE[@]}" -v "$XDG_RUNTIME_DIR:/runtime_dir:rw")
|
||||||
|
else
|
||||||
|
local MOUNT_FILE=("${MOUNT_FILE[@]}" --tmpfs "/runtime_dir")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -S "$SSH_AUTH_SOCK" ]; then
|
||||||
|
local MOUNT_FILE=("${MOUNT_FILE[@]}" -v "$SSH_AUTH_SOCK:/runtime_dir/ssh-agent.socket: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
|
||||||
|
|
||||||
echo "Files mount options: ${MOUNT_FILE[*]}"
|
echo "Files mount options: ${MOUNT_FILE[*]}"
|
||||||
echo "Folder mount options: ${MOUNT_FOLDER[*]}"
|
|
||||||
podman run --privileged -it --rm \
|
podman run --privileged -it --rm \
|
||||||
|
--shm-size=0 \
|
||||||
|
--init \
|
||||||
--network host \
|
--network host \
|
||||||
--tz Europe/Warsaw \
|
|
||||||
-e XDG_RUNTIME_DIR=/runtime_dir \
|
-e XDG_RUNTIME_DIR=/runtime_dir \
|
||||||
-e SSH_AUTH_SOCK=/runtime_dir/ssh-agent.socket \
|
-e SSH_AUTH_SOCK=/runtime_dir/ssh-agent.socket \
|
||||||
-e WAYLAND_DISPLAY="$WAYLAND_DISPLAY" \
|
-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/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/:/root/.local/state/nvim/shada/:rw \
|
||||||
"${MOUNT_FILE[@]}" \
|
"${MOUNT_FILE[@]}" \
|
||||||
"${MOUNT_FOLDER[@]}" \
|
|
||||||
neovim:latest "$@"
|
neovim:latest "$@"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -128,19 +133,11 @@ then use function below.
|
||||||
```bash
|
```bash
|
||||||
function nvim_project() {
|
function nvim_project() {
|
||||||
# Mount current folder to a container that will not be removed on exit.
|
# Mount current folder to a container that will not be removed on exit.
|
||||||
# Requires first argument to be a name for the container so it can be
|
|
||||||
# easily reentered later.
|
|
||||||
# If you specify some paths as latter parameters, then these paths will
|
# If you specify some paths as latter parameters, then these paths will
|
||||||
# be mounted instead of current folder.
|
# be mounted instead of current folder.
|
||||||
# Also mounts wayland for clipboard sync.
|
# Also mounts wayland for clipboard sync.
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
read -p "Enter container name: " container_name
|
||||||
echo "give project/container name as first parameter"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
local container_name="$1"
|
|
||||||
shift # skip first parameter as it can be name of a folder/file in
|
|
||||||
# current dir so it could try mounting it later
|
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
if [ -f "$arg" ] || [ -d "$arg" ]; then
|
if [ -f "$arg" ] || [ -d "$arg" ]; then
|
||||||
local MOUNT_FILE=("${MOUNT_FILE[@]}" -v "$arg:$arg:rw")
|
local MOUNT_FILE=("${MOUNT_FILE[@]}" -v "$arg:$arg:rw")
|
||||||
|
@ -152,7 +149,7 @@ function nvim_project() {
|
||||||
# mount on base_path to make sessions saving work
|
# mount on base_path to make sessions saving work
|
||||||
local base_path
|
local base_path
|
||||||
base_path="$(pwd)"
|
base_path="$(pwd)"
|
||||||
local MOUNT_FOLDER=(--workdir "/data$base_path" -v "$base_path:/data$base_path:rw")
|
local MOUNT_FILE=(--workdir "/data$base_path" -v "$base_path:/data$base_path:rw")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$HOME/.gitconfig" ]; then
|
if [ -f "$HOME/.gitconfig" ]; then
|
||||||
|
@ -163,18 +160,24 @@ function nvim_project() {
|
||||||
local MOUNT_FILE=("${MOUNT_FILE[@]}" -v "$HOME/.ssh/known_hosts:/root/.ssh/known_hosts:ro")
|
local MOUNT_FILE=("${MOUNT_FILE[@]}" -v "$HOME/.ssh/known_hosts:/root/.ssh/known_hosts:ro")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -S "$XDG_RUNTIME_DIR/ssh-agent.socket" ]; then
|
if [ -d "$XDG_RUNTIME_DIR" ]; then
|
||||||
local MOUNT_FILE=("${MOUNT_FILE[@]}" -v "$XDG_RUNTIME_DIR/ssh-agent.socket:/runtime_dir/ssh-agent.socket:rw")
|
local MOUNT_FILE=("${MOUNT_FILE[@]}" -v "$XDG_RUNTIME_DIR:/runtime_dir:rw")
|
||||||
|
else
|
||||||
|
local MOUNT_FILE=("${MOUNT_FILE[@]}" --tmpfs "/runtime_dir")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -S "$SSH_AUTH_SOCK" ]; then
|
||||||
|
local MOUNT_FILE=("${MOUNT_FILE[@]}" -v "$SSH_AUTH_SOCK:/runtime_dir/ssh-agent.socket: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
|
||||||
|
|
||||||
echo "Files mount options: ${MOUNT_FILE[*]}"
|
echo "Files mount options: ${MOUNT_FILE[*]}"
|
||||||
echo "Folder mount options: ${MOUNT_FOLDER[*]}"
|
|
||||||
podman run --privileged -it \
|
podman run --privileged -it \
|
||||||
|
--shm-size=0 \
|
||||||
|
--init \
|
||||||
--network host \
|
--network host \
|
||||||
--tz Europe/Warsaw \
|
|
||||||
-e XDG_RUNTIME_DIR=/runtime_dir \
|
-e XDG_RUNTIME_DIR=/runtime_dir \
|
||||||
-e SSH_AUTH_SOCK=/runtime_dir/ssh-agent.socket \
|
-e SSH_AUTH_SOCK=/runtime_dir/ssh-agent.socket \
|
||||||
-e WAYLAND_DISPLAY="$WAYLAND_DISPLAY" \
|
-e WAYLAND_DISPLAY="$WAYLAND_DISPLAY" \
|
||||||
|
@ -182,8 +185,8 @@ function nvim_project() {
|
||||||
-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/:/root/.local/state/nvim/shada/:rw \
|
||||||
"${MOUNT_FILE[@]}" \
|
"${MOUNT_FILE[@]}" \
|
||||||
"${MOUNT_FOLDER[@]}" \
|
|
||||||
--entrypoint bash \
|
--entrypoint bash \
|
||||||
|
"$@" \
|
||||||
--name "nvim-$container_name" \
|
--name "nvim-$container_name" \
|
||||||
neovim:latest
|
neovim:latest
|
||||||
}
|
}
|
||||||
|
@ -242,7 +245,7 @@ There is need to make sure your system can display (almost) any unicode
|
||||||
character. Hacked fonts may be needed for filetype icons but there is also
|
character. Hacked fonts may be needed for filetype icons but there is also
|
||||||
need for a dedicated package with unicode fonts (like unifont-fonts.noarch)
|
need for a dedicated package with unicode fonts (like unifont-fonts.noarch)
|
||||||
that will have every character missing from default font used in Neovim editor.
|
that will have every character missing from default font used in Neovim editor.
|
||||||
Link to hacked fonts:
|
Link to hacked fonts:\
|
||||||
[https://www.nerdfonts.com/font-downloads](https://www.nerdfonts.com/font-downloads)
|
[https://www.nerdfonts.com/font-downloads](https://www.nerdfonts.com/font-downloads)
|
||||||
|
|
||||||
### General info
|
### General info
|
||||||
|
@ -259,15 +262,15 @@ All that is saved in image, so that is why image is so heavy.
|
||||||
|
|
||||||
|keys|action|
|
|keys|action|
|
||||||
|----|----|
|
|----|----|
|
||||||
|\<leader\>l|disable (search) highlighting|
|
|\<leader>l|disable (search) highlighting|
|
||||||
|\<leader\>cb|Close all buffers (:bufdo bd)|
|
|\<leader>cb|Close all buffers (:bufdo bd)|
|
||||||
|
|
||||||
#### Opened files navigation
|
#### Opened files navigation
|
||||||
|
|
||||||
|keys|action|
|
|keys|action|
|
||||||
|----|----|
|
|----|----|
|
||||||
|Ctrl w w| Move to next splitted frame|
|
|Ctrl w w| Move to next splitted frame|
|
||||||
|Ctrl w \<arrow\> | moving throught splitted frame|
|
|Ctrl w \<arrow> | moving throught splitted frame|
|
||||||
|Ctrl w c | close split|
|
|Ctrl w c | close split|
|
||||||
|Ctrl w v | split vertically|
|
|Ctrl w v | split vertically|
|
||||||
|Ctrl w s| split horizontally|
|
|Ctrl w s| split horizontally|
|
||||||
|
@ -287,7 +290,7 @@ All that is saved in image, so that is why image is so heavy.
|
||||||
|----|----|
|
|----|----|
|
||||||
|Ctrl+t | Toggle file explorer when not focused on it|
|
|Ctrl+t | Toggle file explorer when not focused on it|
|
||||||
|f | Toggle filtering when focused on explorer|
|
|f | Toggle filtering when focused on explorer|
|
||||||
|\<leader\> n | Move focus to explorer|
|
|\<leader> n | Move focus to explorer|
|
||||||
|d |Delete selected file|
|
|d |Delete selected file|
|
||||||
|rn |Rename file|
|
|rn |Rename file|
|
||||||
|c |add file to clipboard|
|
|c |add file to clipboard|
|
||||||
|
@ -297,10 +300,10 @@ All that is saved in image, so that is why image is so heavy.
|
||||||
|
|
||||||
|keys|action|
|
|keys|action|
|
||||||
|----|----|
|
|----|----|
|
||||||
|\<leader\>ff |Find files|
|
|\<leader>ff |Find files|
|
||||||
|\<leader\>fg| Live grep|
|
|\<leader>fg| Live grep|
|
||||||
|\<leader\>fb| Buffers|
|
|\<leader>fb| Buffers|
|
||||||
|\<leader\>fh |Help tags|
|
|\<leader>fh |Help tags|
|
||||||
|Ctrl+/|Show mappings for picker actions (insert mode)|
|
|Ctrl+/|Show mappings for picker actions (insert mode)|
|
||||||
|Ctrl+q| Open search result list as a dedicated split (quickfix list) (will overwrite previous one created this way in current tab)|
|
|Ctrl+q| Open search result list as a dedicated split (quickfix list) (will overwrite previous one created this way in current tab)|
|
||||||
|Ctrl+u | Scroll preview up|
|
|Ctrl+u | Scroll preview up|
|
||||||
|
@ -359,7 +362,6 @@ Bindings:
|
||||||
|<leader>gc|git_commits|
|
|<leader>gc|git_commits|
|
||||||
|<leader>gb|git_branches|
|
|<leader>gb|git_branches|
|
||||||
|
|
||||||
|
|
||||||
GitSings provides some commands for displaying git stuff:
|
GitSings provides some commands for displaying git stuff:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -385,33 +387,32 @@ GitSings provides some commands for displaying git stuff:
|
||||||
|
|
||||||
|||
|
|||
|
||||||
|----|----|
|
|----|----|
|
||||||
|\<space\>q | open list with diagnostics postions|
|
|\<space>q | open list with diagnostics postions|
|
||||||
|\<space\>e |open diagnostics floating window|
|
|\<space>e |open diagnostics floating window|
|
||||||
|\[d | next diagnostic|
|
|\[d | next diagnostic|
|
||||||
|\] | previous diagnostic|
|
|\] | previous diagnostic|
|
||||||
|\<leader\>k| open hoover box and enter it|
|
|\<leader>k| open hoover box and enter it|
|
||||||
|\<leader\>rn |rename element (function name, etc)|
|
|\<leader>rn |rename element (function name, etc)|
|
||||||
|\<leader\>f| format file|
|
|\<leader>f| format file|
|
||||||
|gd |go to definition|
|
|gd |go to definition|
|
||||||
|gD| go to declaration|
|
|gD| go to declaration|
|
||||||
|\<space\>D| go to type definition|
|
|\<space>D| go to type definition|
|
||||||
|gi| go to implementation|
|
|gi| go to implementation|
|
||||||
|gr| go to references|
|
|gr| go to references|
|
||||||
|Ctrl+f |scroll down popup with docstring|
|
|Ctrl+f |scroll down popup with docstring|
|
||||||
|Ctrl+b |scroll up popup with docstring|
|
|Ctrl+b |scroll up popup with docstring|
|
||||||
|\<leader\>wa |add workspace folder|
|
|\<leader>wa |add workspace folder|
|
||||||
|\<leader\>wr |remove workspace folder|
|
|\<leader>wr |remove workspace folder|
|
||||||
|\<leader\>wl | list workspace folders |
|
|\<leader>wl | list workspace folders |
|
||||||
|
|
||||||
|
|
||||||
#### LSP diagnostics (custom and trouble.nvim)
|
#### LSP diagnostics (custom and trouble.nvim)
|
||||||
|
|
||||||
|||
|
|||
|
||||||
|----|----|
|
|----|----|
|
||||||
|\<leader\>vt| switch display of virtual text|
|
|\<leader>vt| switch display of virtual text|
|
||||||
|\<leader\>xx| Open diagnostics window|
|
|\<leader>xx| Open diagnostics window|
|
||||||
|gR | lsp references |
|
|gR | lsp references |
|
||||||
|\<space\>ca | code action menu |
|
|\<space>ca | code action menu |
|
||||||
|
|
||||||
#### Sessions
|
#### Sessions
|
||||||
|
|
||||||
|
|
|
@ -1,77 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
function nvim() {
|
|
||||||
# Mount current folder OR folders/files given as parameters, then
|
|
||||||
# open neovim. Container will be removed on neovim exit.
|
|
||||||
# Mount wayland for clipboard sync.
|
|
||||||
# Also pass all parameters to neovim as its arguments.
|
|
||||||
|
|
||||||
for arg in "$@"; do
|
|
||||||
if [ -f "$arg" ] || [ -d "$arg" ] ; then
|
|
||||||
local MOUNT_FILE="$MOUNT_FILE -v "$arg:$arg:rw""
|
|
||||||
echo "Mounting $arg"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [ -z "$MOUNT_FILE" ]; then
|
|
||||||
# mount current workdir if no arguments with path
|
|
||||||
# mount on base_path to make sessions saving work
|
|
||||||
local base_path
|
|
||||||
base_path="$(pwd)"
|
|
||||||
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
|
|
||||||
|
|
||||||
podman run --privileged -it --rm \
|
|
||||||
-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 \
|
|
||||||
$MOUNT_FILE \
|
|
||||||
$MOUNT_FOLDER \
|
|
||||||
neovim:latest "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
function nvim_project() {
|
|
||||||
# Mount current folder to a container that will not be removed on exit.
|
|
||||||
# Requires first argument to be a name for the container so it can be
|
|
||||||
# easily reentered later.
|
|
||||||
# If you specify some paths as latter parameters, then these paths will
|
|
||||||
# be mounted instead of current folder.
|
|
||||||
# Also mounts wayland for clipboard sync.
|
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
echo "give project/container name as first parameter"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
local container_name
|
|
||||||
container_name="$1"
|
|
||||||
shift # skip first parameter as it can be name of a folder/file in
|
|
||||||
# current dir so it could try mounting it later
|
|
||||||
for arg in "$@"; do
|
|
||||||
if [ -f "$arg" ] || [ -d "$arg" ] ; then
|
|
||||||
local MOUNT_FILE="$MOUNT_FILE -v "$arg:$arg:rw""
|
|
||||||
echo "Mounting $arg"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [ -z "$MOUNT_FILE" ]; then
|
|
||||||
# mount current workdir if no arguments with path
|
|
||||||
# mount on base_path to make sessions saving work
|
|
||||||
local base_path
|
|
||||||
base_path="$(pwd)"
|
|
||||||
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
|
|
||||||
|
|
||||||
podman run --privileged -it \
|
|
||||||
-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 \
|
|
||||||
$MOUNT_FILE \
|
|
||||||
$MOUNT_FOLDER \
|
|
||||||
--entrypoint bash \
|
|
||||||
--name $container_name \
|
|
||||||
neovim:latest
|
|
||||||
}
|
|
|
@ -6,6 +6,8 @@ return {
|
||||||
-- Define your formatters
|
-- Define your formatters
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
yaml = { "yamlfmt" },
|
yaml = { "yamlfmt" },
|
||||||
|
markdown = { "mdformat" },
|
||||||
|
bash = { "shfmt" },
|
||||||
--lua = { "stylua" },
|
--lua = { "stylua" },
|
||||||
--python = { "isort", "black" },
|
--python = { "isort", "black" },
|
||||||
--javascript = { "prettierd", "prettier", stop_after_first = true },
|
--javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||||
|
@ -18,8 +20,8 @@ return {
|
||||||
--format_on_save = { timeout_ms = 500 },
|
--format_on_save = { timeout_ms = 500 },
|
||||||
-- Customize formatters
|
-- Customize formatters
|
||||||
formatters = {
|
formatters = {
|
||||||
shfmt = {
|
yamlfmt = {
|
||||||
prepend_args = { "-i", "2" },
|
prepend_args = { "-formatter", "retain_line_breaks=true,indentless_arrays=true" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue