chore(nvim): improve base configuration
* [lsp] Configure `gopls` * [lsp] Update `openapi` schema reference * [colorscheme] Update `gruvbox-material` configuration
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
diff --git a/init.lua b/init.lua
|
diff --git a/init.lua b/init.lua
|
||||||
index b98ffc6..d9e223a 100644
|
index b98ffc6..22b2196 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 = ' '
|
||||||
@@ -69,7 +69,7 @@ index b98ffc6..d9e223a 100644
|
|||||||
|
|
||||||
-- Enable the following language servers
|
-- Enable the following language servers
|
||||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
||||||
@@ -684,6 +693,28 @@ require('lazy').setup({
|
@@ -684,6 +693,39 @@ require('lazy').setup({
|
||||||
-- ts_ls = {},
|
-- ts_ls = {},
|
||||||
--
|
--
|
||||||
|
|
||||||
@@ -82,7 +82,18 @@ index b98ffc6..d9e223a 100644
|
|||||||
+ mixEnv = 'test',
|
+ mixEnv = 'test',
|
||||||
+ },
|
+ },
|
||||||
+ },
|
+ },
|
||||||
+ gopls = {},
|
+ gopls = {
|
||||||
|
+ filetypes = { 'go', 'gomod', 'gowork', 'gotmpl' },
|
||||||
|
+ settings = {
|
||||||
|
+ gopls = {
|
||||||
|
+ completeUnimported = true,
|
||||||
|
+ usePlaceholders = true,
|
||||||
|
+ analyses = {
|
||||||
|
+ unusedparams = true,
|
||||||
|
+ },
|
||||||
|
+ },
|
||||||
|
+ },
|
||||||
|
+ },
|
||||||
+ harper_ls = {},
|
+ harper_ls = {},
|
||||||
+ helm_ls = {},
|
+ helm_ls = {},
|
||||||
+ html = { filetypes = { 'html', 'twig', 'hbs' } },
|
+ html = { filetypes = { 'html', 'twig', 'hbs' } },
|
||||||
@@ -98,7 +109,7 @@ index b98ffc6..d9e223a 100644
|
|||||||
lua_ls = {
|
lua_ls = {
|
||||||
-- cmd = { ... },
|
-- cmd = { ... },
|
||||||
-- filetypes = { ... },
|
-- filetypes = { ... },
|
||||||
@@ -698,6 +729,38 @@ require('lazy').setup({
|
@@ -698,6 +740,38 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -118,7 +129,7 @@ index b98ffc6..d9e223a 100644
|
|||||||
+ ["https://json.schemastore.org/prettierrc.json"] = ".prettierrc.{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/circleciconfig.json"] = ".circleci/config.{yml,yaml}",
|
||||||
+ ["https://json.schemastore.org/dependabot-v2"] = ".github/dependabot.{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://spec.openapis.org/oas/3.1/schema/2022-10-07"] = "*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/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/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/argoproj/argo-workflows/master/api/jsonschema/schema.json"] = "*flow*.{yml,yaml}",
|
||||||
@@ -137,7 +148,7 @@ index b98ffc6..d9e223a 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Ensure the servers and tools above are installed
|
-- Ensure the servers and tools above are installed
|
||||||
@@ -719,20 +782,36 @@ require('lazy').setup({
|
@@ -719,20 +793,36 @@ require('lazy').setup({
|
||||||
})
|
})
|
||||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||||
|
|
||||||
@@ -188,7 +199,7 @@ index b98ffc6..d9e223a 100644
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -809,6 +888,9 @@ require('lazy').setup({
|
@@ -809,6 +899,9 @@ require('lazy').setup({
|
||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
'folke/lazydev.nvim',
|
'folke/lazydev.nvim',
|
||||||
@@ -198,7 +209,7 @@ index b98ffc6..d9e223a 100644
|
|||||||
},
|
},
|
||||||
--- @module 'blink.cmp'
|
--- @module 'blink.cmp'
|
||||||
--- @type blink.cmp.Config
|
--- @type blink.cmp.Config
|
||||||
@@ -854,9 +936,19 @@ require('lazy').setup({
|
@@ -854,9 +947,19 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
|
|
||||||
sources = {
|
sources = {
|
||||||
@@ -219,7 +230,7 @@ index b98ffc6..d9e223a 100644
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -882,19 +974,39 @@ require('lazy').setup({
|
@@ -882,19 +985,39 @@ require('lazy').setup({
|
||||||
--
|
--
|
||||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||||
'folke/tokyonight.nvim',
|
'folke/tokyonight.nvim',
|
||||||
@@ -251,21 +262,21 @@ index b98ffc6..d9e223a 100644
|
|||||||
+ -- For monoglow the following variants area available:
|
+ -- For monoglow the following variants area available:
|
||||||
+ -- 'monoglow-z', 'monoglow-lack', or 'monoglow-void'.
|
+ -- '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
|
+ -- 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_better_performance = 1
|
||||||
+ -- vim.g.gruvbox_material_foreground = 'material'
|
+ vim.g.gruvbox_material_foreground = 'material'
|
||||||
+ -- vim.g.gruvbox_material_background = 'medium'
|
+ vim.g.gruvbox_material_background = 'medium'
|
||||||
+ -- vim.g.gruvbox_material_ui_contrast = 'low'
|
+ vim.g.gruvbox_material_ui_contrast = 'low'
|
||||||
+ -- vim.g.gruvbox_material_float_style = 'dim'
|
+ vim.g.gruvbox_material_float_style = 'dim'
|
||||||
+ -- vim.g.gruvbox_material_enable_italic = 0
|
+ vim.g.gruvbox_material_enable_italic = 0
|
||||||
+ -- vim.g.gruvbox_material_disable_italic_comment = 1
|
+ vim.g.gruvbox_material_disable_italic_comment = 1
|
||||||
+ -- vim.g.gruvbox_material_cursor = 'red'
|
+ vim.g.gruvbox_material_cursor = 'red'
|
||||||
+ -- vim.g.gruvbox_material_disable_terminal_colors = 1
|
+ vim.g.gruvbox_material_disable_terminal_colors = 1
|
||||||
+ -- vim.cmd.colorscheme 'gruvbox-material'
|
+ vim.cmd.colorscheme 'gruvbox-material'
|
||||||
+ vim.cmd.colorscheme 'lackluster'
|
+ -- vim.cmd.colorscheme 'lackluster'
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -944,7 +1056,39 @@ require('lazy').setup({
|
@@ -944,7 +1067,39 @@ require('lazy').setup({
|
||||||
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
||||||
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
||||||
opts = {
|
opts = {
|
||||||
@@ -306,7 +317,7 @@ index b98ffc6..d9e223a 100644
|
|||||||
-- Autoinstall languages that are not installed
|
-- Autoinstall languages that are not installed
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = {
|
highlight = {
|
||||||
@@ -974,17 +1118,17 @@ require('lazy').setup({
|
@@ -974,17 +1129,17 @@ 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',
|
||||||
|
Reference in New Issue
Block a user