feat: add moar lsp/aliases and upgrade neovim/runtimes (#52)
A lot of updates in my personal development environment:
## Additions
1. Command lines and runtimes:
1. [`ctlptl`][2]: `cli` to make local `kubernetes` cluster management easier
1. [`eksctl`][3]: `cli` to make `eks` cluster management easier
1. [`r`][4]: software environment for statistical computing and graphics
1. [`usage`][5]: specification for `cli`s, used by `mise`
1. Aliases:
1. `dc`: for `docker compose`
2. `k`: for `kubectl`
1. Moar `lsp`s:
1. [`cuelsp`][8]: for the [`cue`][9], with [`dagger`][10] support
1. [`jsonls`][11]: for `json` schemas
1. [`r-languageserver`][12]: for the [`r`][4] environment
1. [`yamlls`][13]: for `yaml` schemas
1. Auto-completion for:
1. [`ctlptl`][2]
1. [`eksctl`][3]
1. `helm`
1. `k3d`
1. `k9s`
1. `kubectl`
1. `lefthook`
1. `mise`
## Upgrades
1. Runtimes:
1. [`elixir` from 1.16.2 to 1.17.0][0]
1. [`erlang` from 26.2.5 to 27.0][1]
1. [`kickstart.nvim` to latest commit][6]
1. [Installation of `atuin`][7]
Reviewed-on: #52
[0]: https://elixir-lang.org/blog/2024/06/12/elixir-v1-17-0-released/
[1]: https://www.erlang.org/news/170
[2]: https://github.com/tilt-dev/ctlptl
[3]: https://eksctl.io/
[4]: https://www.r-project.org/
[5]: https://usage.jdx.dev/
[6]: 5aeddfdd5d
[7]: https://github.com/atuinsh/atuin?tab=readme-ov-file#install
[8]: https://github.com/dagger/cuelsp
[9]: https://cuelang.org/
[10]: https://dagger.io/
[11]: https://github.com/microsoft/vscode-json-languageservice
[12]: https://github.com/REditorSupport/languageserver
[13]: https://github.com/redhat-developer/yaml-language-server
Co-authored-by: Joao P Dubas <joao.dubas+gitea@gmail.com>
Co-committed-by: Joao P Dubas <joao.dubas+gitea@gmail.com>
This commit is contained in:
parent
5e38d5886a
commit
9605631b51
13
Dockerfile
13
Dockerfile
@ -112,7 +112,6 @@ ENV DC_URL https://github.com/docker/compose/releases/download/${DC_VERSION}/doc
|
|||||||
ENV BX_VERSION v0.13.1
|
ENV BX_VERSION v0.13.1
|
||||||
ENV BX_URL https://github.com/docker/buildx/releases/download/${BX_VERSION}/buildx-${BX_VERSION}.linux-amd64
|
ENV BX_URL https://github.com/docker/buildx/releases/download/${BX_VERSION}/buildx-${BX_VERSION}.linux-amd64
|
||||||
RUN curl -sS https://starship.rs/install.sh | sh -s -- --yes \
|
RUN curl -sS https://starship.rs/install.sh | sh -s -- --yes \
|
||||||
&& curl -sS https://setup.atuin.sh | bash \
|
|
||||||
&& mkdir /tmp/download \
|
&& mkdir /tmp/download \
|
||||||
&& curl -L ${DO_URL} | tar -zx -C /tmp/download \
|
&& curl -L ${DO_URL} | tar -zx -C /tmp/download \
|
||||||
&& chgrp --recursive docker /tmp/download \
|
&& chgrp --recursive docker /tmp/download \
|
||||||
@ -162,6 +161,7 @@ RUN git clone https://github.com/elixir-lsp/elixir-ls.git ${LOCAL_SRC_HOME}/elix
|
|||||||
ENV MISE_ENV_FILE .env
|
ENV MISE_ENV_FILE .env
|
||||||
RUN curl https://mise.jdx.dev/install.sh | sh \
|
RUN curl https://mise.jdx.dev/install.sh | sh \
|
||||||
&& curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash \
|
&& curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash \
|
||||||
|
&& curl -sS https://raw.githubusercontent.com/atuinsh/atuin/main/install.sh | bash \
|
||||||
&& git clone https://github.com/tmux-plugins/tpm.git ${XDG_CONFIG_HOME}/tmux/plugins/tpm
|
&& git clone https://github.com/tmux-plugins/tpm.git ${XDG_CONFIG_HOME}/tmux/plugins/tpm
|
||||||
|
|
||||||
# configure fish and bash
|
# configure fish and bash
|
||||||
@ -173,14 +173,17 @@ RUN fish -c true \
|
|||||||
&& echo 'alias cat="bat"' >> ${XDG_CONFIG_HOME}/fish/config.fish \
|
&& echo 'alias cat="bat"' >> ${XDG_CONFIG_HOME}/fish/config.fish \
|
||||||
&& echo 'alias l="eza --time-style=long-iso --color=auto --classify=always"' >> ${XDG_CONFIG_HOME}/fish/config.fish \
|
&& echo 'alias l="eza --time-style=long-iso --color=auto --classify=always"' >> ${XDG_CONFIG_HOME}/fish/config.fish \
|
||||||
&& echo 'alias ll="l -ahl"' >> ${XDG_CONFIG_HOME}/fish/config.fish \
|
&& echo 'alias ll="l -ahl"' >> ${XDG_CONFIG_HOME}/fish/config.fish \
|
||||||
&& echo 'alias la="l -a"' >> ${XDG_CONFIG_HOME}/fish/config.fish
|
&& echo 'alias la="l -a"' >> ${XDG_CONFIG_HOME}/fish/config.fish \
|
||||||
|
&& echo 'alias k="kubectl"' >> ${XDG_CONFIG_HOME}/fish/config.fish \
|
||||||
|
&& echo 'alias dc="docker compose"' >> ${XDG_CONFIG_HOME}/fish/config.fish \
|
||||||
|
&& echo 'alias nh="nvim --listen 0.0.0.0:6666 --headless &> /dev/null' >> ${XDG_CONFIG_HOME}/fish/config.fish
|
||||||
|
|
||||||
# git configuration
|
# git configuration
|
||||||
COPY ./patch/kickstart.nvim/updates.patch /tmp
|
COPY ./patch/kickstart.nvim/updates.patch /tmp
|
||||||
COPY ./config/nvim/lua/custom/plugins/init.lua /tmp
|
COPY ./config/nvim/lua/custom/plugins/init.lua /tmp
|
||||||
RUN git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME}"/nvim \
|
RUN git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME}"/nvim \
|
||||||
&& cd ${XDG_CONFIG_HOME}/nvim \
|
&& cd ${XDG_CONFIG_HOME}/nvim \
|
||||||
&& git reset --hard b9bd02d55b77293291a38fac9abe46acad9ab91d \
|
&& git reset --hard 5aeddfdd5d0308506ec63b0e4f8de33e2a39355f \
|
||||||
&& git apply /tmp/updates.patch \
|
&& git apply /tmp/updates.patch \
|
||||||
&& cp /tmp/init.lua ${XDG_CONFIG_HOME}/nvim/lua/custom/plugins \
|
&& cp /tmp/init.lua ${XDG_CONFIG_HOME}/nvim/lua/custom/plugins \
|
||||||
&& nvim --headless "+Lazy! sync" +qa
|
&& nvim --headless "+Lazy! sync" +qa
|
||||||
@ -191,7 +194,9 @@ RUN ${LOCAL_BIN_HOME}/mise plugins install --force --yes \
|
|||||||
bat \
|
bat \
|
||||||
bitwarden \
|
bitwarden \
|
||||||
circleci-cli \
|
circleci-cli \
|
||||||
|
ctlptl \
|
||||||
dagger \
|
dagger \
|
||||||
|
eksctl \
|
||||||
elixir \
|
elixir \
|
||||||
erlang \
|
erlang \
|
||||||
eza \
|
eza \
|
||||||
@ -207,6 +212,7 @@ RUN ${LOCAL_BIN_HOME}/mise plugins install --force --yes \
|
|||||||
lua \
|
lua \
|
||||||
luajit \
|
luajit \
|
||||||
poetry \
|
poetry \
|
||||||
|
r \
|
||||||
ripgrep \
|
ripgrep \
|
||||||
rust \
|
rust \
|
||||||
starship \
|
starship \
|
||||||
@ -214,6 +220,7 @@ RUN ${LOCAL_BIN_HOME}/mise plugins install --force --yes \
|
|||||||
terraform \
|
terraform \
|
||||||
tilt \
|
tilt \
|
||||||
tmux \
|
tmux \
|
||||||
|
usage \
|
||||||
usql \
|
usql \
|
||||||
yarn \
|
yarn \
|
||||||
zoxide
|
zoxide
|
||||||
|
@ -3,9 +3,11 @@ awscli = "2.15.49"
|
|||||||
bat = "0.24.0"
|
bat = "0.24.0"
|
||||||
bitwarden = "2024.4.1"
|
bitwarden = "2024.4.1"
|
||||||
circleci-cli = "0.1.30549"
|
circleci-cli = "0.1.30549"
|
||||||
|
ctlptl = "0.8.29"
|
||||||
dagger = "0.11.4"
|
dagger = "0.11.4"
|
||||||
elixir = "1.16.2-otp-26"
|
eksctl = "0.180.0"
|
||||||
erlang = "26.2.5"
|
elixir = "1.17.0-otp-27"
|
||||||
|
erlang = "27.0"
|
||||||
eza = "0.18.15"
|
eza = "0.18.15"
|
||||||
fzf = "0.52.1"
|
fzf = "0.52.1"
|
||||||
go = "1.22.3"
|
go = "1.22.3"
|
||||||
@ -22,6 +24,7 @@ luajit = "2.0.5--2.4.4"
|
|||||||
node = "22.1.0"
|
node = "22.1.0"
|
||||||
poetry = "1.8.3"
|
poetry = "1.8.3"
|
||||||
python = "3.12.3"
|
python = "3.12.3"
|
||||||
|
r = "4.4.0"
|
||||||
ripgrep = "14.1.0"
|
ripgrep = "14.1.0"
|
||||||
rust = "1.78.0"
|
rust = "1.78.0"
|
||||||
starship = "1.18.2"
|
starship = "1.18.2"
|
||||||
@ -29,6 +32,7 @@ task = "3.37.2"
|
|||||||
terraform = "1.8.3"
|
terraform = "1.8.3"
|
||||||
tilt = "0.33.13"
|
tilt = "0.33.13"
|
||||||
tmux = "3.4"
|
tmux = "3.4"
|
||||||
|
usage = "0.3.0"
|
||||||
usql = "0.19.1"
|
usql = "0.19.1"
|
||||||
yarn = "1.22.19"
|
yarn = "1.22.19"
|
||||||
zoxide = "0.9.4"
|
zoxide = "0.9.4"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
diff --git a/init.lua b/init.lua
|
diff --git a/init.lua b/init.lua
|
||||||
index 88658ef..d9e96ee 100644
|
index 88658ef..b2e4e40 100644
|
||||||
--- a/init.lua
|
--- a/init.lua
|
||||||
+++ b/init.lua
|
+++ b/init.lua
|
||||||
@@ -91,7 +91,7 @@ vim.g.mapleader = ' '
|
@@ -91,7 +91,7 @@ vim.g.mapleader = ' '
|
||||||
@ -39,10 +39,11 @@ index 88658ef..d9e96ee 100644
|
|||||||
-- [[ Basic Keymaps ]]
|
-- [[ Basic Keymaps ]]
|
||||||
-- See `:help vim.keymap.set()`
|
-- See `:help vim.keymap.set()`
|
||||||
|
|
||||||
@@ -578,6 +586,18 @@ require('lazy').setup({
|
@@ -578,6 +586,28 @@ require('lazy').setup({
|
||||||
-- tsserver = {},
|
-- tsserver = {},
|
||||||
--
|
--
|
||||||
|
|
||||||
|
+ cuelsp = {},
|
||||||
+ elixirls = {
|
+ elixirls = {
|
||||||
+ elixirLS = {
|
+ elixirLS = {
|
||||||
+ dialyzerEnabled = true,
|
+ dialyzerEnabled = true,
|
||||||
@ -55,21 +56,53 @@ index 88658ef..d9e96ee 100644
|
|||||||
+ helm_ls = {},
|
+ helm_ls = {},
|
||||||
+ html = { filetypes = { 'html', 'twig', 'hbs' } },
|
+ html = { filetypes = { 'html', 'twig', 'hbs' } },
|
||||||
+ htmx = {},
|
+ htmx = {},
|
||||||
|
+ jsonls = {
|
||||||
|
+ settings = {
|
||||||
|
+ json = {
|
||||||
|
+ -- schemas = {
|
||||||
|
+ -- ["https://raw.githubusercontent.com/woodpecker-ci/woodpecker/main/pipeline/frontend/yaml/linter/schema/schema.json"] = "renovate.json",
|
||||||
|
+ -- },
|
||||||
|
+ },
|
||||||
|
+ },
|
||||||
|
+ },
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
-- cmd = {...},
|
-- cmd = {...},
|
||||||
-- filetypes = { ...},
|
-- filetypes = { ...},
|
||||||
@@ -592,6 +612,10 @@ require('lazy').setup({
|
@@ -592,6 +622,33 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
+ pyright = {},
|
+ pyright = {},
|
||||||
|
+ r_language_server = {},
|
||||||
+ templ = {},
|
+ templ = {},
|
||||||
+ terraformls = {},
|
+ terraformls = {},
|
||||||
+ tsserver = {},
|
+ tsserver = {},
|
||||||
|
+ yamlls = {
|
||||||
|
+ settings = {
|
||||||
|
+ yaml = {
|
||||||
|
+ schemas = {
|
||||||
|
+ ["https://json.schemastore.org/chart.json"] = "Chart.{yml,yaml}",
|
||||||
|
+ ["https://json.schemastore.org/drone.json"] = ".drone.{yml,yaml}",
|
||||||
|
+ ["https://json.schemastore.org/github-action.json"] = ".github/action.{yml,yaml}",
|
||||||
|
+ ["https://json.schemastore.org/github-workflow.json"] = ".github/workflows/*",
|
||||||
|
+ ["https://json.schemastore.org/kustomization.json"] = "kustomization.{yml,yaml}",
|
||||||
|
+ ["https://json.schemastore.org/prettierrc.json"] = ".prettierrc.{yml,yaml}",
|
||||||
|
+ ["https://json.schemastore.org/circleciconfig.json"] = ".circleci/config.{yml,yaml}",
|
||||||
|
+ ["https://json.schemastore.org/dependabot-v2"] = ".github/dependabot.{yml,yaml}",
|
||||||
|
+ ["https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json"] = "*api*.{yml,yaml}",
|
||||||
|
+ ["https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible.json#/$defs/playbook"] = "*play*.{yml,yaml}",
|
||||||
|
+ ["https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible.json#/$defs/tasks"] = "roles/tasks/*.{yml,yaml}",
|
||||||
|
+ ["https://raw.githubusercontent.com/argoproj/argo-workflows/master/api/jsonschema/schema.json"] = "*flow*.{yml,yaml}",
|
||||||
|
+ ["https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json"] = "*docker-compose*.{yml,yaml}",
|
||||||
|
+ -- kubernetes = "*.{yml,yaml}",
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Ensure the servers and tools above are installed
|
-- Ensure the servers and tools above are installed
|
||||||
@@ -618,6 +642,33 @@ require('lazy').setup({
|
@@ -618,6 +675,33 @@ require('lazy').setup({
|
||||||
-- by the server configuration above. Useful when disabling
|
-- by the server configuration above. Useful when disabling
|
||||||
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
||||||
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||||
@ -103,7 +136,7 @@ index 88658ef..d9e96ee 100644
|
|||||||
require('lspconfig')[server_name].setup(server)
|
require('lspconfig')[server_name].setup(server)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
@@ -835,7 +886,38 @@ require('lazy').setup({
|
@@ -835,7 +919,38 @@ require('lazy').setup({
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
build = ':TSUpdate',
|
build = ':TSUpdate',
|
||||||
opts = {
|
opts = {
|
||||||
@ -143,7 +176,7 @@ index 88658ef..d9e96ee 100644
|
|||||||
-- Autoinstall languages that are not installed
|
-- Autoinstall languages that are not installed
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = {
|
highlight = {
|
||||||
@@ -874,18 +956,18 @@ require('lazy').setup({
|
@@ -874,18 +989,18 @@ require('lazy').setup({
|
||||||
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
||||||
--
|
--
|
||||||
-- require 'kickstart.plugins.debug',
|
-- require 'kickstart.plugins.debug',
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# NOTE (jpd): setup elixir-ls for older versions of elixir
|
# NOTE: (jpd) setup elixir-ls for older versions of elixir
|
||||||
if [ ! -d ${LOCAL_SRC_HOME}/elixir-ls/release ]; then
|
if [ ! -d ${LOCAL_SRC_HOME}/elixir-ls/release ]; then
|
||||||
echo "setup elixir ls version 0.12.0"
|
echo "setup elixir ls version 0.12.0"
|
||||||
/usr/local/bin/elixir-ls-setup v0.12.0
|
/usr/local/bin/elixir-ls-setup v0.12.0
|
||||||
@ -9,4 +9,25 @@ if [ ! -d ${LOCAL_SRC_HOME}/elixir-ls/release ]; then
|
|||||||
/usr/local/bin/elixir-ls-setup v0.14.6
|
/usr/local/bin/elixir-ls-setup v0.14.6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# NOTE: (jpd) create auto-completion
|
||||||
|
commands=(
|
||||||
|
"ctlptl"
|
||||||
|
"eksctl"
|
||||||
|
"helm"
|
||||||
|
"k3d"
|
||||||
|
"k9s"
|
||||||
|
"kind"
|
||||||
|
"kubectl"
|
||||||
|
"lefthook"
|
||||||
|
"mise"
|
||||||
|
)
|
||||||
|
echo "create completion for ${commands[@]}"
|
||||||
|
for cmd in ${commands[@]}; do
|
||||||
|
completion_dir=${XDG_CONFIG_HOME}/fish/completions/${cmd}.fish
|
||||||
|
if [ ! -f ${completion_dir} ]; then
|
||||||
|
echo "setup ${cmd} completion"
|
||||||
|
$(echo ${cmd} completion fish) > ${completion_dir}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user