2023-10-01 23:39:11 +00:00
|
|
|
diff --git a/init.lua b/init.lua
|
2025-01-21 15:27:06 +00:00
|
|
|
index 4eae8e7..ab4f5f6 100644
|
2023-10-01 23:39:11 +00:00
|
|
|
--- a/init.lua
|
|
|
|
+++ b/init.lua
|
2024-03-28 00:18:20 +00:00
|
|
|
@@ -91,7 +91,7 @@ vim.g.mapleader = ' '
|
|
|
|
vim.g.maplocalleader = ' '
|
2024-02-01 12:51:41 +00:00
|
|
|
|
2024-05-09 00:15:44 +00:00
|
|
|
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
2024-03-28 00:18:20 +00:00
|
|
|
-vim.g.have_nerd_font = false
|
|
|
|
+vim.g.have_nerd_font = true
|
2023-10-01 23:39:11 +00:00
|
|
|
|
|
|
|
-- [[ Setting options ]]
|
2024-03-28 00:18:20 +00:00
|
|
|
-- 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
|
2023-10-01 23:39:11 +00:00
|
|
|
|
2024-03-29 20:32:55 +00:00
|
|
|
-- Enable mouse mode, can be useful for resizing splits for example!
|
2024-03-28 00:18:20 +00:00
|
|
|
-vim.opt.mouse = 'a'
|
|
|
|
+vim.opt.mouse = ''
|
2023-10-01 23:39:11 +00:00
|
|
|
|
2024-03-28 00:18:20 +00:00
|
|
|
-- Don't show the mode, since it's already in the status line
|
|
|
|
vim.opt.showmode = false
|
2025-01-21 15:27:06 +00:00
|
|
|
@@ -156,6 +156,14 @@ vim.opt.cursorline = true
|
2024-03-28 00:18:20 +00:00
|
|
|
-- Minimal number of screen lines to keep above and below the cursor.
|
|
|
|
vim.opt.scrolloff = 10
|
2023-10-01 23:39:11 +00:00
|
|
|
|
|
|
|
+-- Set foldmethod
|
|
|
|
+-- See `:help foldmethod`
|
2024-03-28 00:18:20 +00:00
|
|
|
+vim.opt.foldcolumn = '1'
|
|
|
|
+vim.opt.foldlevel = 99
|
|
|
|
+vim.opt.foldlevelstart = 99
|
|
|
|
+vim.opt.foldenable = true
|
|
|
|
+vim.opt.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
2023-10-01 23:39:11 +00:00
|
|
|
+
|
|
|
|
-- [[ Basic Keymaps ]]
|
2024-03-28 00:18:20 +00:00
|
|
|
-- See `:help vim.keymap.set()`
|
2023-10-01 23:39:11 +00:00
|
|
|
|
2025-01-21 15:27:06 +00:00
|
|
|
@@ -629,6 +637,27 @@ require('lazy').setup({
|
2024-09-17 11:32:59 +00:00
|
|
|
-- ts_ls = {},
|
2024-03-28 00:18:20 +00:00
|
|
|
--
|
2023-10-01 23:39:11 +00:00
|
|
|
|
2024-06-16 18:25:22 +00:00
|
|
|
+ cuelsp = {},
|
2024-03-28 00:18:20 +00:00
|
|
|
+ elixirls = {
|
|
|
|
+ elixirLS = {
|
|
|
|
+ dialyzerEnabled = true,
|
|
|
|
+ dialyzerFormat = 'dialyxir_long',
|
|
|
|
+ fetchDeps = false,
|
|
|
|
+ mixEnv = 'test',
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ gopls = {},
|
|
|
|
+ helm_ls = {},
|
|
|
|
+ html = { filetypes = { 'html', 'twig', 'hbs' } },
|
2024-06-16 18:25:22 +00:00
|
|
|
+ jsonls = {
|
|
|
|
+ settings = {
|
|
|
|
+ json = {
|
|
|
|
+ -- schemas = {
|
|
|
|
+ -- ["https://raw.githubusercontent.com/woodpecker-ci/woodpecker/main/pipeline/frontend/yaml/linter/schema/schema.json"] = "renovate.json",
|
|
|
|
+ -- },
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ },
|
2024-03-28 00:18:20 +00:00
|
|
|
lua_ls = {
|
2025-01-21 15:27:06 +00:00
|
|
|
-- cmd = { ... },
|
|
|
|
-- filetypes = { ... },
|
|
|
|
@@ -643,6 +672,32 @@ require('lazy').setup({
|
2024-03-28 00:18:20 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
+ pyright = {},
|
|
|
|
+ templ = {},
|
|
|
|
+ terraformls = {},
|
2024-09-17 11:32:59 +00:00
|
|
|
+ ts_ls = {},
|
2024-06-16 18:25:22 +00:00
|
|
|
+ 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}",
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
2024-03-28 00:18:20 +00:00
|
|
|
}
|
2023-11-13 11:33:09 +00:00
|
|
|
|
2024-03-28 00:18:20 +00:00
|
|
|
-- Ensure the servers and tools above are installed
|
2025-01-21 15:27:06 +00:00
|
|
|
@@ -672,6 +727,33 @@ require('lazy').setup({
|
2024-03-28 00:18:20 +00:00
|
|
|
-- by the server configuration above. Useful when disabling
|
2024-09-17 11:32:59 +00:00
|
|
|
-- certain features of an LSP (for example, turning off formatting for ts_ls)
|
2024-03-28 00:18:20 +00:00
|
|
|
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,
|
|
|
|
},
|
2025-01-21 15:27:06 +00:00
|
|
|
@@ -902,7 +984,39 @@ require('lazy').setup({
|
2024-09-17 11:32:59 +00:00
|
|
|
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
|
|
|
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
2024-03-28 00:18:20 +00:00
|
|
|
opts = {
|
2024-08-16 14:44:03 +00:00
|
|
|
- ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
|
2024-03-28 00:18:20 +00:00
|
|
|
+ ensure_installed = {
|
2024-03-29 20:32:55 +00:00
|
|
|
+ 'bash',
|
|
|
|
+ 'c',
|
2024-03-28 00:18:20 +00:00
|
|
|
+ 'css',
|
2024-05-09 00:15:44 +00:00
|
|
|
+ 'diff',
|
2024-03-28 00:18:20 +00:00
|
|
|
+ 'dockerfile',
|
|
|
|
+ 'eex',
|
|
|
|
+ 'elixir',
|
|
|
|
+ 'erlang',
|
|
|
|
+ 'gitcommit',
|
|
|
|
+ 'go',
|
|
|
|
+ 'heex',
|
|
|
|
+ 'html',
|
|
|
|
+ 'http',
|
|
|
|
+ 'javascript',
|
|
|
|
+ 'json',
|
2024-04-08 18:24:28 +00:00
|
|
|
+ 'jsonc',
|
2024-03-28 00:18:20 +00:00
|
|
|
+ 'lua',
|
2024-03-29 20:32:55 +00:00
|
|
|
+ 'luadoc',
|
2024-03-28 00:18:20 +00:00
|
|
|
+ 'markdown',
|
|
|
|
+ 'markdown_inline',
|
|
|
|
+ 'python',
|
2024-08-16 14:44:03 +00:00
|
|
|
+ 'query',
|
2024-03-28 00:18:20 +00:00
|
|
|
+ 'sql',
|
2024-04-08 18:24:28 +00:00
|
|
|
+ 'templ',
|
|
|
|
+ 'terraform',
|
2024-03-28 00:18:20 +00:00
|
|
|
+ 'toml',
|
|
|
|
+ 'tsx',
|
|
|
|
+ 'typescript',
|
|
|
|
+ 'vim',
|
|
|
|
+ 'vimdoc',
|
|
|
|
+ 'yaml',
|
|
|
|
+ },
|
|
|
|
-- Autoinstall languages that are not installed
|
|
|
|
auto_install = true,
|
|
|
|
highlight = {
|
2025-01-21 15:27:06 +00:00
|
|
|
@@ -932,17 +1046,17 @@ require('lazy').setup({
|
2024-03-28 00:18:20 +00:00
|
|
|
-- 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',
|
2024-05-09 00:15:44 +00:00
|
|
|
-- 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
|
2023-11-13 11:33:09 +00:00
|
|
|
|
2024-03-28 00:18:20 +00:00
|
|
|
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
2024-05-09 00:15:44 +00:00
|
|
|
-- This is the easiest way to modularize your config.
|
2024-03-28 00:18:20 +00:00
|
|
|
--
|
|
|
|
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
|
|
|
- -- { import = 'custom.plugins' },
|
|
|
|
+ { import = 'custom.plugins' },
|
2024-12-11 11:38:13 +00:00
|
|
|
--
|
|
|
|
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
|
|
|
|
-- Or use telescope!
|