diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index f5418c69..9e25ce81 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -78,7 +78,7 @@ "nvim-dap-python": { "branch": "master", "commit": "37b4cba02e337a95cb62ad1609b3d1dccb2e5d42" }, "nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" }, - "nvim-devdocs": { "branch": "master", "commit": "7414d200c829acb05c1850264ba90232c1726079" }, + "nvim-devdocs": { "branch": "master", "commit": "382e1710b9e82731485bd11cb3306675f127b5e6" }, "nvim-jdtls": { "branch": "master", "commit": "a09f8cdd75c546eb024d0f0b5b3ad185f05b738f" }, "nvim-jqx": { "branch": "master", "commit": "11b1d0368e5b23b9c356da8e5f70bb5827f27f62" }, "nvim-lightbulb": { "branch": "master", "commit": "8f00b89dd1b1dbde16872bee5fbcee2e58c9b8e9" }, @@ -89,7 +89,7 @@ "nvim-puppeteer": { "branch": "main", "commit": "b2793ab39120086fa59327d3901a847961198662" }, "nvim-regexplainer": { "branch": "main", "commit": "187f8666c2ba0fcba4ddb991e48d7229b0a58d96" }, "nvim-spectre": { "branch": "master", "commit": "696cff781a4a7ecc91549736835e2acbd00fe859" }, - "nvim-treesitter": { "branch": "master", "commit": "0b50cf159283855b72f4c6b22f5ba3c9cf813b37" }, + "nvim-treesitter": { "branch": "master", "commit": "84544f5cd3b7c046ebe0db6763c9ce7f20f4fe23" }, "nvim-treesitter-context": { "branch": "master", "commit": "8aa32aa6b84dda357849dbc0f775e69f2e04c041" }, "nvim-treesitter-endwise": { "branch": "master", "commit": "4c344ffc8d54d7e1ba2cefaaa2c10ea93aa1cc2d" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "eb208bfdfcf76efea0424747e23e44641e13aaa6" }, @@ -113,6 +113,7 @@ "rest.nvim": { "branch": "main", "commit": "5bcaa1012ea8efd6093c69d2a4c67fbde760d043" }, "rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" }, "satellite.nvim": { "branch": "main", "commit": "7911fa8137c77258ba509ba875ea52c6d59737e8" }, + "semshi": { "branch": "master", "commit": "50f9d74ee160e539c5662cbde5c3b0ccd4e27fb3" }, "smart-splits.nvim": { "branch": "master", "commit": "c8a9173d70cbbd1f6e4a414e49e31df2b32a1362" }, "sqlite.lua": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" }, "suda.vim": { "branch": "master", "commit": "8b0fc3711760195aba104e2d190cff9af8267052" }, diff --git a/.config/nvim/lazyvim.json b/.config/nvim/lazyvim.json index d6166dac..24c6783e 100644 --- a/.config/nvim/lazyvim.json +++ b/.config/nvim/lazyvim.json @@ -43,6 +43,7 @@ "plugins.extras.refactor", "plugins.extras.rest-client", "plugins.extras.scrollbar", + "plugins.extras.semshi", "plugins.extras.smooth-scrolling", "plugins.extras.test-extended", "plugins.extras.web", diff --git a/.config/nvim/lua/plugins/extras/ansible.lua b/.config/nvim/lua/plugins/extras/ansible.lua new file mode 100644 index 00000000..36eb23f8 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/ansible.lua @@ -0,0 +1,46 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "yaml" }) + end + end, + }, + { + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + -- for ansiblels validation + vim.list_extend(opts.ensure_installed, { "ansible-lint", "ansible-language-server" }) + end, + }, + { + "neovim/nvim-lspconfig", + opts = { + servers = { + ansiblels = {}, + }, + }, + }, + { + "mfussenegger/nvim-lint", + opts = { + linters_by_ft = { + ansible = { "ansible-lint" }, + }, + }, + }, + { + "mfussenegger/nvim-ansible", + keys = { + { + "tp", + function() + require("ansible").run() + end, + desc = "Run Ansible Playbooks", + }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/extras/php.lua b/.config/nvim/lua/plugins/extras/php.lua new file mode 100644 index 00000000..07e8debf --- /dev/null +++ b/.config/nvim/lua/plugins/extras/php.lua @@ -0,0 +1,47 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + vim.list_extend(opts.ensure_installed, { + "php", + }) + end, + }, + { + "williamboman/mason.nvim", + opts = function(_, opts) + vim.list_extend(opts.ensure_installed, { + "phpactor", + }) + end, + }, + { + "neovim/nvim-lspconfig", + opts = { + servers = { + phpactor = {}, + }, + }, + }, + { + "mfussenegger/nvim-dap", + optional = true, + dependencies = { + "williamboman/mason.nvim", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + table.insert(opts.ensure_installed, "php-debug-adapter") + end + end, + }, + opts = function() + local dap = require("dap") + local path = require("mason-registry").get_package("php-debug-adapter"):get_install_path() + dap.adapters.php = { + type = "executable", + command = "node", + args = { path .. "/extension/out/phpDebug.js" }, + } + end, + }, +} diff --git a/.config/nvim/lua/plugins/extras/semshi.lua b/.config/nvim/lua/plugins/extras/semshi.lua new file mode 100644 index 00000000..3553b96c --- /dev/null +++ b/.config/nvim/lua/plugins/extras/semshi.lua @@ -0,0 +1,35 @@ +return { + { + -- "numiras/semshi", + "wookayin/semshi", -- use a maintained fork + ft = "python", + build = ":UpdateRemotePlugins", + init = function() + -- Disabled these features better provided by LSP or other more general plugins + vim.g["semshi#error_sign"] = false + vim.g["semshi#simplify_markup"] = false + vim.g["semshi#mark_selected_nodes"] = false + vim.g["semshi#update_delay_factor"] = 0.001 + -- This autocmd must be defined in init to take effect + vim.api.nvim_create_autocmd({ "VimEnter", "ColorScheme" }, { + group = vim.api.nvim_create_augroup("SemanticHighlight", {}), + callback = function() + -- Only add style, inherit or link to the LSP's colors + vim.cmd([[ + highlight! semshiGlobal gui=italic + highlight! semshiImported gui=bold + highlight! link semshiImported @none + highlight! link semshiParameter @lsp.type.parameter + highlight! link semshiParameterUnused DiagnosticUnnecessary + highlight! link semshiBuiltin @function.builtin + highlight! link semshiAttribute @attribute + highlight! link semshiAttribute @field + highlight! link semshiSelf @lsp.type.selfKeyword + highlight! link semshiUnresolved @lsp.type.unresolvedReference + highlight! link semshiFree @none + ]]) + end, + }) + end, + }, +}