Skip to content

Commit

Permalink
flake.lock: Update
Browse files Browse the repository at this point in the history
Flake lock file updates:

• Updated input 'neorocks':
    'github:nvim-neorocks/neorocks/3f5fdf527017992d1784de3ca75b44bb7a6143db?narHash=sha256-%2Bt0ESlkalYZZTwoAddR99qyODuHTcZVmPhYFZZNjEck%3D' (2025-01-18)
  → 'github:nvim-neorocks/neorocks/7d9d257d0e3c36dcc643e16a6efb73552c6982f3?narHash=sha256-0WQB6R5gYlvzbHdOWZ9%2BZr7uxtu0AFdxuQYXcGfV3d8%3D' (2025-01-25)
• Updated input 'neorocks/git-hooks':
    'github:cachix/git-hooks.nix/94ee657f6032d913fe0ef49adaa743804635b0bb?narHash=sha256-I/OuxGwXwRi5gnFPsyCvVR%2BIfFstA%2BQXEpHu1hvsgD8%3D' (2025-01-16)
  → 'github:cachix/git-hooks.nix/9364dc02281ce2d37a1f55b6e51f7c0f65a75f17?narHash=sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg%3D' (2025-01-21)
• Updated input 'neorocks/neovim-nightly':
    'github:nix-community/neovim-nightly-overlay/7d67e712dff97cca8e6eff015af8fbddab332062?narHash=sha256-NWsz/64rMc4B7374QhoMFb3O/tLr3e1FBouIgxHioaQ%3D' (2025-01-17)
  → 'github:nix-community/neovim-nightly-overlay/8a11d160b76ea8dc76ac3356140010e38fef0ab5?narHash=sha256-fohNScp0mg8eUugIoqcLhy7tnUJ7CxhcVomizNqj5b8%3D' (2025-01-25)
• Updated input 'neorocks/neovim-nightly/git-hooks':
    'github:cachix/git-hooks.nix/94ee657f6032d913fe0ef49adaa743804635b0bb?narHash=sha256-I/OuxGwXwRi5gnFPsyCvVR%2BIfFstA%2BQXEpHu1hvsgD8%3D' (2025-01-16)
  → 'github:cachix/git-hooks.nix/9364dc02281ce2d37a1f55b6e51f7c0f65a75f17?narHash=sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg%3D' (2025-01-21)
• Updated input 'neorocks/neovim-nightly/neovim-src':
    'github:neovim/neovim/fb564ddff0b4ec9dad5afa7548777af1c3044273?narHash=sha256-MVW/WeEfQYB9rnzxOiFA9Go5vhNSA7RLFdRFbpL/h9c%3D' (2025-01-16)
  → 'github:neovim/neovim/c6d2cbf8f51abfa0c9d244ef384a15b0b69e16c6?narHash=sha256-7bgefXUOc5AVXSZ4E%2B0YzJKW4c%2BtDj1ttmDoZN1BhPs%3D' (2025-01-24)
• Updated input 'neorocks/neovim-nightly/nixpkgs':
    'github:NixOS/nixpkgs/ae2fb9f1fb5fcf17fb59f25c2a881c170c501d6f?narHash=sha256-BYsp8PA1j691FupfrLVOQzm4CaYaKtkh4U%2BKuGMnBWw%3D' (2025-01-15)
  → 'github:NixOS/nixpkgs/ecd26a469ac56357fd333946a99086e992452b6a?narHash=sha256-ET91TMkab3PmOZnqiJQYOtSGvSTvGeHoegAv4zcTefM%3D' (2025-01-24)
• Updated input 'neorocks/neovim-nightly/treefmt-nix':
    'github:numtide/treefmt-nix/97871d416166803134ba64597a1006f3f670fbde?narHash=sha256-saLiCRQ5RtdTnznT/fja7GxcYRAzeY3k8S%2BIF/2s/2A%3D' (2025-01-16)
  → 'github:numtide/treefmt-nix/f2cc121df15418d028a59c9737d38e3a90fbaf8f?narHash=sha256-5An1wq5U8sNycOBBg3nsDDgpwBmR9liOpDGlhliA6Xo%3D' (2025-01-21)
• Updated input 'neorocks/nixpkgs':
    'github:nixos/nixpkgs/ae06b9c2d83cb5c8b12d7d0e32692e93d1379713?narHash=sha256-RCzJE9wKByLCXmRBp%2Bz8LK9EgdW%2BK%2BW/DXnJS4S/NVo%3D' (2025-01-16)
  → 'github:nixos/nixpkgs/ecd26a469ac56357fd333946a99086e992452b6a?narHash=sha256-ET91TMkab3PmOZnqiJQYOtSGvSTvGeHoegAv4zcTefM%3D' (2025-01-24)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/ae06b9c2d83cb5c8b12d7d0e32692e93d1379713?narHash=sha256-RCzJE9wKByLCXmRBp%2Bz8LK9EgdW%2BK%2BW/DXnJS4S/NVo%3D' (2025-01-16)
  → 'github:nixos/nixpkgs/ecd26a469ac56357fd333946a99086e992452b6a?narHash=sha256-ET91TMkab3PmOZnqiJQYOtSGvSTvGeHoegAv4zcTefM%3D' (2025-01-24)
• Updated input 'pre-commit-hooks':
    'github:cachix/pre-commit-hooks.nix/94ee657f6032d913fe0ef49adaa743804635b0bb?narHash=sha256-I/OuxGwXwRi5gnFPsyCvVR%2BIfFstA%2BQXEpHu1hvsgD8%3D' (2025-01-16)
  → 'github:cachix/pre-commit-hooks.nix/9364dc02281ce2d37a1f55b6e51f7c0f65a75f17?narHash=sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg%3D' (2025-01-21)
  • Loading branch information
github-actions[bot] authored and mrcjkb committed Jan 27, 2025
1 parent e15c262 commit 04ec0da
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 32 deletions.
34 changes: 34 additions & 0 deletions
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
local M = {}

local compat = require('rustaceanvim.compat')

local function handler(_, result, ctx)
if result == nil or vim.tbl_isempty(result) then
vim.notify("Can't find parent module.", vim.log.levels.ERROR)
return
end

local location = result

if vim.islist(result) then
location = result[1]
end

local client = vim.lsp.get_client_by_id(ctx.client_id)
if client then
compat.show_document(location, client.offset_encoding or 'utf-8')
end
end

--- Sends the request to rust-analyzer to get the parent modules location and open it
function M.parent_module()
local ra = require('rustaceanvim.rust_analyzer')
local clients = ra.get_active_rustaceanvim_clients(0)
if #clients == 0 then
return
end
local params = vim.lsp.util.make_position_params(0, clients[1].offset_encoding or 'utf-8')
ra.buf_request(0, 'experimental/parentModule', params, handler)
end

return M.parent_module
60 changes: 30 additions & 30 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lua/rustaceanvim/commands/parent_module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local compat = require('rustaceanvim.compat')

local function handler(_, result, ctx)
if result == nil or vim.tbl_isempty(result) then
vim.api.nvim_out_write("Can't find parent module\n")
vim.notify("Can't find parent module.", vim.log.levels.ERROR)
return
end

Expand Down
2 changes: 1 addition & 1 deletion lua/rustaceanvim/executors/termopen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ local M = {
vim.keymap.set('n', '<Esc>', '<CMD>q<CR>', { buffer = latest_buf_id, noremap = true })

-- run the command
vim.fn.termopen(full_command)
vim.fn.jobstart(full_command, { term = true })

-- when the buffer is closed, set the latest buf id to nil else there are
-- some edge cases with the id being sit but a buffer not being open
Expand Down

0 comments on commit 04ec0da

Please sign in to comment.