From b0c3b0e5007d177afc0342cd548154b80232bc3b Mon Sep 17 00:00:00 2001 From: Ralph Azucena Date: Tue, 13 Aug 2024 19:34:44 -0700 Subject: [PATCH] updated ferkin nvim - damn ruby stuff --- lazy-lock.json | 80 +++++++------- lazyvim.json | 2 +- lua/config/lazy.lua | 184 ++++++++++++++++--------------- lua/plugins/extras_ruby_mine.lua | 20 ++-- 4 files changed, 149 insertions(+), 137 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index f88502e..f13bd75 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,49 +1,55 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, - "LazyVim": { "branch": "main", "commit": "2a7ba6d09ce85fa752c25e68ca5287e24b8cee75" }, - "bufferline.nvim": { "branch": "main", "commit": "1662fed6ecd512d1f381fc2a4e77532c379d25c6" }, - "catppuccin": { "branch": "main", "commit": "894efb557728e532aa98b98029d16907a214ec05" }, + "LazyVim": { "branch": "main", "commit": "12818a6cb499456f4903c5d8e68af43753ebc869" }, + "bufferline.nvim": { "branch": "main", "commit": "0b2fd861eee7595015b6561dade52fb060be10c4" }, + "catppuccin": { "branch": "main", "commit": "18bab5ec4c782cdf7d7525dbe89c60bfa02fc195" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "conform.nvim": { "branch": "master", "commit": "c26dadf8a47a547768d1048a0d698ecec33494ce" }, + "conform.nvim": { "branch": "master", "commit": "667102f26106709cddd2dff1f699610df5b94d7f" }, "copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" }, "copilot.lua": { "branch": "master", "commit": "86537b286f18783f8b67bccd78a4ef4345679625" }, - "dashboard-nvim": { "branch": "master", "commit": "4f7f9369f2cf896adcb7c1780ecd07674d1f34b5" }, + "dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" }, "dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" }, - "flash.nvim": { "branch": "main", "commit": "43f67935d388fbb540f8b40e8cbfd80de54f978a" }, - "friendly-snippets": { "branch": "main", "commit": "682157939e57bd6a2c86277dfd4d6fbfce63dbac" }, - "gitsigns.nvim": { "branch": "main", "commit": "17e8fd66182c9ad79dc129451ad015af3d27529c" }, - "indent-blankline.nvim": { "branch": "master", "commit": "4036c8ae9cc29faf8e6443fa5b23e679db055d24" }, - "lazy.nvim": { "branch": "main", "commit": "378bfb465673a747e9e9f966e518063499e20cfe" }, - "lazydev.nvim": { "branch": "main", "commit": "6184ebbbc8045d70077659b7d30c705a588dc62f" }, - "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, + "flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" }, + "friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" }, + "gitsigns.nvim": { "branch": "main", "commit": "562dc47189ad3c8696dbf460d38603a74d544849" }, + "grug-far.nvim": { "branch": "main", "commit": "536b23dcf3165a622654544e5f9f395584e73b57" }, + "indent-blankline.nvim": { "branch": "master", "commit": "dddb5d21811c319eb6e51a993d8fb44b193aae3f" }, + "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, + "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, + "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" }, - "mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" }, - "neotest": { "branch": "master", "commit": "26ed90509c377d10dbdebd25b7094a886323b32b" }, - "neotest-rspec": { "branch": "main", "commit": "48573d5882cbe8d8bcd3b735d9ee7705168b1b87" }, - "noice.nvim": { "branch": "main", "commit": "cade1f972ba226e7753a7a113f3f1a942908e73c" }, - "nui.nvim": { "branch": "main", "commit": "a2bc1e9d0359caa5d11ad967cd1e30e8d4676226" }, - "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, - "nvim-dap": { "branch": "master", "commit": "6f79b822997f2e8a789c6034e147d42bc6706770" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "f2acd4a21db1ca0a12559e7a9f7cdace3bdbfb09" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "mini.ai": { "branch": "main", "commit": "a9b992b13d22a8db8df6beac25afa59a10b5584d" }, + "mini.icons": { "branch": "main", "commit": "fe63fe080e76d80713557e5f0c65bc15b14b152d" }, + "mini.pairs": { "branch": "main", "commit": "927d19cbdd0e752ab1c7eed87072e71d2cd6ff51" }, + "neo-tree.nvim": { "branch": "main", "commit": "206241e451c12f78969ff5ae53af45616ffc9b72" }, + "neotest": { "branch": "master", "commit": "32ff2ac21135a372a42b38ae131e531e64833bd3" }, + "neotest-rspec": { "branch": "main", "commit": "53fc108a06ae43d7f873d42ee5189c2301e33623" }, + "noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" }, + "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, + "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, + "nvim-dap": { "branch": "master", "commit": "2b428ff2632e73295e9decbcf1c40d8e26213305" }, "nvim-dap-ruby": { "branch": "main", "commit": "4176405d186a93ebec38a6344df124b1689cfcfd" }, - "nvim-lspconfig": { "branch": "master", "commit": "9c9eb07fecc578e25e28db8dc9002b43fff2ed79" }, - "nvim-nio": { "branch": "master", "commit": "7969e0a8ffabdf210edd7978ec954a47a737bbcc" }, + "nvim-lint": { "branch": "master", "commit": "ad0fe35e80f5cd31a0f19176d7b30e5c3011119d" }, + "nvim-lspconfig": { "branch": "master", "commit": "a67bc39aaa4f1e13212c5022a561120846eaef27" }, + "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, - "nvim-snippets": { "branch": "main", "commit": "5c978b3ba0c504dc9f94ca93d17029f26064d229" }, - "nvim-spectre": { "branch": "master", "commit": "ec67d4b5370094b923dfcf6b09b39142f2964861" }, - "nvim-tree.lua": { "branch": "master", "commit": "8b2c5c678be4b49dff6a2df794877000113fd77b" }, - "nvim-treesitter": { "branch": "master", "commit": "d4a888ae3cff358cb239643c45b2b38bb60e29c6" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" }, - "nvim-ts-autotag": { "branch": "main", "commit": "ddfccbf0df1b9349c2b9e9b17f4afa8f9b6c1ed1" }, - "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" }, - "persistence.nvim": { "branch": "main", "commit": "95d03ad5450389ad7dc2a0fab14ebb3d46bc2c96" }, + "nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" }, + "nvim-tree.lua": { "branch": "master", "commit": "ad0b95dee55955817af635fa121f6e2486b10583" }, + "nvim-treesitter": { "branch": "master", "commit": "047ce49ccf9a2dce22e1cf3843bef3b5682a8144" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "ced6375723b20616282f9f6a1018a63ae19b106a" }, + "nvim-ts-autotag": { "branch": "main", "commit": "dc5e1687ab76ee02e0f11c5ce137f530b36e98b3" }, + "nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" }, + "persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" }, "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, - "telescope.nvim": { "branch": "master", "commit": "58ec6eca1c3704d130d749843e16fbf6c8cdc57e" }, - "todo-comments.nvim": { "branch": "main", "commit": "51e10f838e84b4756c16311d0b1ef0972c6482d2" }, - "trouble.nvim": { "branch": "main", "commit": "88c3be40c061ce053ab326ce4fdcb973a1f785ff" }, - "ts-comments.nvim": { "branch": "main", "commit": "c075b4ee00f6e111b44bf99a8cfd5a4cfce9258a" }, - "which-key.nvim": { "branch": "main", "commit": "0099511294f16b81c696004fa6a403b0ae61f7a0" } -} \ No newline at end of file + "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, + "telescope.nvim": { "branch": "master", "commit": "68a6d8e8a0a8276ad56dc2a5bc29a4767a8eb5da" }, + "todo-comments.nvim": { "branch": "main", "commit": "8f45f353dc3649cb9b44cecda96827ea88128584" }, + "tokyonight.nvim": { "branch": "main", "commit": "b0e7c7382a7e8f6456f2a95655983993ffda745e" }, + "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, + "ts-comments.nvim": { "branch": "main", "commit": "98d7d4dec0af1312d38e288f800bbf6ff562b6ab" }, + "which-key.nvim": { "branch": "main", "commit": "6c1584eb76b55629702716995cca4ae2798a9cca" } +} diff --git a/lazyvim.json b/lazyvim.json index b1aed37..8e6b0ec 100644 --- a/lazyvim.json +++ b/lazyvim.json @@ -3,7 +3,7 @@ ], "news": { - "NEWS.md": "6077" + "NEWS.md": "6520" }, "version": 6 } \ No newline at end of file diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index af4e5e0..c420a34 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -11,6 +11,10 @@ require("lazy").setup({ -- add LazyVim and import its plugins { "LazyVim/LazyVim", import = "lazyvim.plugins" }, -- import any extras modules here + -- + -- added then proceeded to disable + -- { import = "lazyvim.plugins.extras.lang.ruby" }, + -- -- { import = "lazyvim.plugins.extras.lang.typescript" }, -- { import = "lazyvim.plugins.extras.lang.json" }, -- { import = "lazyvim.plugins.extras.ui.mini-animate" }, @@ -49,93 +53,93 @@ require("lazy").setup({ }, }) ---------------------------- -------- TEMPORARY ------- ---------------------------- --- textDocument/diagnostic support until 0.10.0 is released -local _timers = {} -local function setup_diagnostics(client, buffer) - if require("vim.lsp.diagnostic")._enable then - return - end - - local diagnostic_handler = function() - local params = vim.lsp.util.make_text_document_params(buffer) - client.request("textDocument/diagnostic", { textDocument = params }, function(err, result) - if err then - local err_msg = string.format("diagnostics error - %s", vim.inspect(err)) - vim.lsp.log.error(err_msg) - end - local diagnostic_items = {} - if result then - diagnostic_items = result.items - end - vim.lsp.diagnostic.on_publish_diagnostics( - nil, - vim.tbl_extend("keep", params, { diagnostics = diagnostic_items }), - { client_id = client.id } - ) - end) - end - - diagnostic_handler() -- to request diagnostics on buffer when first attaching - - vim.api.nvim_buf_attach(buffer, false, { - on_lines = function() - if _timers[buffer] then - vim.fn.timer_stop(_timers[buffer]) - end - _timers[buffer] = vim.fn.timer_start(200, diagnostic_handler) - end, - on_detach = function() - if _timers[buffer] then - vim.fn.timer_stop(_timers[buffer]) - end - end, - }) -end - --- adds ShowRubyDeps command to show dependencies in the quickfix list. --- add the `all` argument to show indirect dependencies as well -local function add_ruby_deps_command(client, bufnr) - vim.api.nvim_buf_create_user_command(bufnr, "ShowRubyDeps", function(opts) - local params = vim.lsp.util.make_text_document_params() - local showAll = opts.args == "all" - - client.request("rubyLsp/workspace/dependencies", params, function(error, result) - if error then - print("Error showing deps: " .. error) - return - end - - local qf_list = {} - for _, item in ipairs(result) do - if showAll or item.dependency then - table.insert(qf_list, { - text = string.format("%s (%s) - %s", item.name, item.version, item.dependency), - - filename = item.path, - }) - end - end - - vim.fn.setqflist(qf_list) - vim.cmd("copen") - end, bufnr) - end, { - nargs = "?", - complete = function() - return { "all" } - end, - }) -end - -require("lspconfig").ruby_lsp.setup({ - on_attach = function(client, buffer) - setup_diagnostics(client, buffer) - add_ruby_deps_command(client, buffer) - end, -}) ---------------------------- -------- TEMPORARY ------- ---------------------------- +-- --------------------------- +-- ------- TEMPORARY ------- +-- --------------------------- +-- -- textDocument/diagnostic support until 0.10.0 is released +-- local _timers = {} +-- local function setup_diagnostics(client, buffer) +-- if require("vim.lsp.diagnostic")._enable then +-- return +-- end +-- +-- local diagnostic_handler = function() +-- local params = vim.lsp.util.make_text_document_params(buffer) +-- client.request("textDocument/diagnostic", { textDocument = params }, function(err, result) +-- if err then +-- local err_msg = string.format("diagnostics error - %s", vim.inspect(err)) +-- vim.lsp.log.error(err_msg) +-- end +-- local diagnostic_items = {} +-- if result then +-- diagnostic_items = result.items +-- end +-- vim.lsp.diagnostic.on_publish_diagnostics( +-- nil, +-- vim.tbl_extend("keep", params, { diagnostics = diagnostic_items }), +-- { client_id = client.id } +-- ) +-- end) +-- end +-- +-- diagnostic_handler() -- to request diagnostics on buffer when first attaching +-- +-- vim.api.nvim_buf_attach(buffer, false, { +-- on_lines = function() +-- if _timers[buffer] then +-- vim.fn.timer_stop(_timers[buffer]) +-- end +-- _timers[buffer] = vim.fn.timer_start(200, diagnostic_handler) +-- end, +-- on_detach = function() +-- if _timers[buffer] then +-- vim.fn.timer_stop(_timers[buffer]) +-- end +-- end, +-- }) +-- end +-- +-- -- adds ShowRubyDeps command to show dependencies in the quickfix list. +-- -- add the `all` argument to show indirect dependencies as well +-- local function add_ruby_deps_command(client, bufnr) +-- vim.api.nvim_buf_create_user_command(bufnr, "ShowRubyDeps", function(opts) +-- local params = vim.lsp.util.make_text_document_params() +-- local showAll = opts.args == "all" +-- +-- client.request("rubyLsp/workspace/dependencies", params, function(error, result) +-- if error then +-- print("Error showing deps: " .. error) +-- return +-- end +-- +-- local qf_list = {} +-- for _, item in ipairs(result) do +-- if showAll or item.dependency then +-- table.insert(qf_list, { +-- text = string.format("%s (%s) - %s", item.name, item.version, item.dependency), +-- +-- filename = item.path, +-- }) +-- end +-- end +-- +-- vim.fn.setqflist(qf_list) +-- vim.cmd("copen") +-- end, bufnr) +-- end, { +-- nargs = "?", +-- complete = function() +-- return { "all" } +-- end, +-- }) +-- end +-- +-- require("lspconfig").ruby_lsp.setup({ +-- on_attach = function(client, buffer) +-- setup_diagnostics(client, buffer) +-- add_ruby_deps_command(client, buffer) +-- end, +-- }) +-- --------------------------- +-- ------- TEMPORARY ------- +-- --------------------------- diff --git a/lua/plugins/extras_ruby_mine.lua b/lua/plugins/extras_ruby_mine.lua index f190cb8..cff1101 100644 --- a/lua/plugins/extras_ruby_mine.lua +++ b/lua/plugins/extras_ruby_mine.lua @@ -7,20 +7,22 @@ return { }) end, }, - { - "williamboman/mason.nvim", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "ruby-lsp", - "rubocop", - }) - end, - }, + -- seems to be unnecessary?? + -- { + -- "williamboman/mason.nvim", + -- opts = function(_, opts) + -- vim.list_extend(opts.ensure_installed, { + -- "ruby-lsp", + -- "rubocop", + -- }) + -- end, + -- }, { "neovim/nvim-lspconfig", opts = { servers = { ruby_lsp = {}, + rubocop = {}, }, }, },