ide/patch/kickstart.nvim/updates.patch

298 lines
11 KiB
Diff

diff --git a/init.lua b/init.lua
index b98ffc6..8013e25 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.o`
@@ -102,10 +102,10 @@ vim.g.have_nerd_font = false
vim.o.number = true
-- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it!
--- vim.o.relativenumber = true
+vim.o.relativenumber = true
-- Enable mouse mode, can be useful for resizing splits for example!
-vim.o.mouse = 'a'
+vim.o.mouse = ''
-- Don't show the mode, since it's already in the status line
vim.o.showmode = false
@@ -166,6 +166,14 @@ vim.o.scrolloff = 10
-- See `:help 'confirm'`
vim.o.confirm = true
+-- 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()`
@@ -640,9 +648,9 @@ require('lazy').setup({
[vim.diagnostic.severity.HINT] = '󰌶 ',
},
} or {},
- virtual_text = {
- source = 'if_many',
- spacing = 2,
+ virtual_text = false,
+ -- Display multiline diagnostics on virtual lines
+ virtual_lines = {
format = function(diagnostic)
local diagnostic_message = {
[vim.diagnostic.severity.ERROR] = diagnostic.message,
@@ -652,6 +660,7 @@ require('lazy').setup({
}
return diagnostic_message[diagnostic.severity]
end,
+ current_line = true,
},
}
@@ -684,6 +693,28 @@ require('lazy').setup({
-- ts_ls = {},
--
+ cuelsp = {},
+ elixirls = {
+ elixirLS = {
+ dialyzerEnabled = true,
+ dialyzerFormat = 'dialyxir_long',
+ fetchDeps = false,
+ mixEnv = 'test',
+ },
+ },
+ gopls = {},
+ harper_ls = {},
+ helm_ls = {},
+ html = { filetypes = { 'html', 'twig', 'hbs' } },
+ 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 = { ... },
@@ -698,6 +729,32 @@ require('lazy').setup({
},
},
},
+ pyright = {},
+ templ = {},
+ terraformls = {},
+ ts_ls = {},
+ 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
@@ -729,6 +786,33 @@ require('lazy').setup({
-- by the server configuration above. Useful when disabling
-- certain features of an LSP (for example, turning off formatting for ts_ls)
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,
},
@@ -809,6 +893,9 @@ require('lazy').setup({
opts = {},
},
'folke/lazydev.nvim',
+ 'saghen/blink.compat',
+ 'supermaven-inc/supermaven-nvim',
+ 'Kaiser-Yang/blink-cmp-avante',
},
--- @module 'blink.cmp'
--- @type blink.cmp.Config
@@ -854,9 +941,19 @@ require('lazy').setup({
},
sources = {
- default = { 'lsp', 'path', 'snippets', 'lazydev' },
+ default = { 'avante', 'lsp', 'path', 'snippets', 'lazydev', 'supermaven' },
providers = {
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
+ avante = {
+ name = 'avante',
+ module = 'blink-cmp-avante',
+ },
+ supermaven = {
+ name = 'supermanve',
+ module = 'blink.compat.source',
+ score_offset = 100,
+ async = true,
+ },
},
},
@@ -882,19 +979,39 @@ require('lazy').setup({
--
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
'folke/tokyonight.nvim',
+ dependencies = {
+ 'drewxs/ash.nvim',
+ 'wnkz/monoglow.nvim',
+ 'rjshkhr/shadow.nvim',
+ 'sainnhe/gruvbox-material',
+ 'slugbyte/lackluster.nvim',
+ },
priority = 1000, -- Make sure to load this before all the other start plugins.
config = function()
---@diagnostic disable-next-line: missing-fields
- require('tokyonight').setup {
- styles = {
- comments = { italic = false }, -- Disable italics in comments
- },
- }
+ -- require('tokyonight').setup {
+ -- styles = {
+ -- comments = { italic = false }, -- Disable italics in comments
+ -- },
+ -- }
-- Load the colorscheme here.
-- Like many other themes, this one has different styles, and you could load
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
- vim.cmd.colorscheme 'tokyonight-night'
+ -- For monoglow the following variants area available:
+ -- 'monoglow-z', 'monoglow-lack', or 'monoglow-void'.
+ -- gruvbox-material configuration based on https://github.com/gonstoll/dotfiles/blob/2d7ec07bd475c73e7ba1a48b27a2a85315bfd2d1/.config/nvim/lua/plugins/colorscheme/gruvbox.lua#L5-L13
+ -- vim.g.gruvbox_material_better_performance = 1
+ -- vim.g.gruvbox_material_foreground = 'material'
+ -- vim.g.gruvbox_material_background = 'medium'
+ -- vim.g.gruvbox_material_ui_contrast = 'low'
+ -- vim.g.gruvbox_material_float_style = 'dim'
+ -- vim.g.gruvbox_material_enable_italic = 0
+ -- vim.g.gruvbox_material_disable_italic_comment = 1
+ -- vim.g.gruvbox_material_cursor = 'red'
+ -- vim.g.gruvbox_material_disable_terminal_colors = 1
+ -- vim.cmd.colorscheme 'gruvbox-material'
+ vim.cmd.colorscheme 'lackluster'
end,
},
@@ -944,7 +1061,39 @@ require('lazy').setup({
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
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 = {
@@ -974,17 +1123,17 @@ 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.
- -- { import = 'custom.plugins' },
+ { import = 'custom.plugins' },
--
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
-- Or use telescope!