ide/patch/kickstart.nvim/updates.patch
Joao P Dubas 0f408f2c53 feat: upgrade runtimes/utilities + nvim config + docker (#54)
Upgrade `docker` and plugins:

* `docker` from 24.0.7 to 27.1.1
* `compose` from 2.23.3 to 2.29.1
* `buildx` from 0.13.1 to 0.16.2

Upgrade `mise` utilites:

* `awscli` from 2.15.49 to 2.17.31
* `bitwarden` from 2024.4.1 to 2024.7.2
* `dagger` from 0.11.4 to 0.12.5
* `eksctl` from 0.180.0 to 0.188.0
* `elixir` from 1.17.0-otp-27 to 1.17.2-otp-27
* `erlang` from 27.0 to 27.0.1
* `eza` from 0.18.15 to 0.19.0
* `fzf` from 0.52.1 to 0.53.0
* `go` from 1.22.3 to 1.23.0
* `helm` from 3.14.4 to 3.15.4
* `k3d` from 5.6.3 to 5.7.3
* `k3sup` from 0.13.5 to 0.13.7
* `k9s` from 0.32.4 to 0.32.5
* `kind` from 0.22.0 to 0.23.0
* `kubectl` from 1.300 to 1.31.0
* `kubie` from 0.23.0 to 0.23.1
* `lefthook` from 1.6.11 to 1.7.13
* `node` from 22.1.0 to 22.6.0
* `python` from 3.12.3 to 3.12.5
* `r` from 4.4.0 to 4.4.1
* `rust` from 1.78.0 to 1.80.1
* `starship` from 1.18.2 to 1.20.1
* `task` from 3.37.2 to 3.38.0
* `terraform` from 1.8.3 to 1.9.4
* `tilt` from 0.33.13 to 0.33.19
* `usql` from 0.19.1 to 0.19.3
* `yarn` from 1.22.19 to 1.22.22

Upgrade `neovim` config to latest commit.

Reviewed-on: #54
Co-authored-by: Joao P Dubas <joao.dubas+gitea@gmail.com>
Co-committed-by: Joao P Dubas <joao.dubas+gitea@gmail.com>
2024-08-16 14:44:03 +00:00

202 lines
7.9 KiB
Diff

diff --git a/init.lua b/init.lua
index 220d304..62a9702 100644
--- a/init.lua
+++ b/init.lua
@@ -91,7 +91,7 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
-- Set to true if you have a Nerd Font installed and selected in the terminal
-vim.g.have_nerd_font = false
+vim.g.have_nerd_font = true
-- [[ Setting options ]]
-- See `:help vim.opt`
@@ -102,10 +102,10 @@ vim.g.have_nerd_font = false
vim.opt.number = true
-- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it!
--- vim.opt.relativenumber = true
+vim.opt.relativenumber = true
-- Enable mouse mode, can be useful for resizing splits for example!
-vim.opt.mouse = 'a'
+vim.opt.mouse = ''
-- Don't show the mode, since it's already in the status line
vim.opt.showmode = false
@@ -157,6 +157,14 @@ vim.opt.cursorline = true
-- Minimal number of screen lines to keep above and below the cursor.
vim.opt.scrolloff = 10
+-- Set foldmethod
+-- See `:help foldmethod`
+vim.opt.foldcolumn = '1'
+vim.opt.foldlevel = 99
+vim.opt.foldlevelstart = 99
+vim.opt.foldenable = true
+vim.opt.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
+
-- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()`
@@ -582,6 +590,28 @@ require('lazy').setup({
-- tsserver = {},
--
+ cuelsp = {},
+ elixirls = {
+ elixirLS = {
+ dialyzerEnabled = true,
+ dialyzerFormat = 'dialyxir_long',
+ fetchDeps = false,
+ mixEnv = 'test',
+ },
+ },
+ gopls = {},
+ helm_ls = {},
+ html = { filetypes = { 'html', 'twig', 'hbs' } },
+ htmx = {},
+ jsonls = {
+ settings = {
+ json = {
+ -- schemas = {
+ -- ["https://raw.githubusercontent.com/woodpecker-ci/woodpecker/main/pipeline/frontend/yaml/linter/schema/schema.json"] = "renovate.json",
+ -- },
+ },
+ },
+ },
lua_ls = {
-- cmd = {...},
-- filetypes = { ...},
@@ -596,6 +626,33 @@ require('lazy').setup({
},
},
},
+ pyright = {},
+ r_language_server = {},
+ templ = {},
+ terraformls = {},
+ 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
@@ -622,6 +679,33 @@ require('lazy').setup({
-- by the server configuration above. Useful when disabling
-- certain features of an LSP (for example, turning off formatting for tsserver)
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
+ -- overwrite elixirls for older versions of elixir
+ -- * elixir 1.11 use version 0.12.0
+ -- * elixir 1.12 use verions 0.14.6
+ if server_name == 'elixirls' then
+ local version = vim.fn.system('mise current elixir') or ''
+ local elixir_servers = {
+ { version = '^1.11', path = '/elixir-ls/release/v0.12.0/language_server.sh' },
+ { version = '^1.12', path = '/elixir-ls/release/v0.14.6/language_server.sh' },
+ }
+ for _, ex_server in ipairs(elixir_servers) do
+ if string.match(version, ex_server.version) == nil then goto continue end
+ server = vim.tbl_extend('keep', server, { cmd = { vim.fn.expand('$LOCAL_SRC_HOME') .. ex_server.path } })
+ ::continue::
+ end
+ elseif server_name == 'pyright' then
+ local python_paths = {
+ { name = 'poetry', cmd = { 'poetry', 'env', 'info', '--executable' }},
+ { name = 'system', cmd = { 'which', 'python' }},
+ }
+ for _, py_server in ipairs(python_paths) do
+ local cmd = vim.system(py_server.cmd, { text = true }):wait()
+ if (cmd.code > 0) then goto continue end
+ local python_path = string.gsub(cmd.stdout, '\n', '')
+ server = vim.tbl_extend('keep', server, { settings = { python = { pythonPath = python_path } } })
+ ::continue::
+ end
+ end
require('lspconfig')[server_name].setup(server)
end,
},
@@ -844,7 +928,39 @@ require('lazy').setup({
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
opts = {
- ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
+ ensure_installed = {
+ 'bash',
+ 'c',
+ 'css',
+ 'diff',
+ 'dockerfile',
+ 'eex',
+ 'elixir',
+ 'erlang',
+ 'gitcommit',
+ 'go',
+ 'heex',
+ 'html',
+ 'http',
+ 'javascript',
+ 'json',
+ 'jsonc',
+ 'lua',
+ 'luadoc',
+ 'markdown',
+ 'markdown_inline',
+ 'python',
+ 'query',
+ 'sql',
+ 'templ',
+ 'terraform',
+ 'toml',
+ 'tsx',
+ 'typescript',
+ 'vim',
+ 'vimdoc',
+ 'yaml',
+ },
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {
@@ -881,18 +997,18 @@ require('lazy').setup({
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
--
-- require 'kickstart.plugins.debug',
- -- require 'kickstart.plugins.indent_line',
+ require 'kickstart.plugins.indent_line',
-- require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.autopairs',
-- require 'kickstart.plugins.neo-tree',
- -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
+ require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- This is the easiest way to modularize your config.
--
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
- -- { import = 'custom.plugins' },
+ { import = 'custom.plugins' },
}, {
ui = {
-- If you are using a Nerd Font: set icons to an empty table which will use the