Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

feat: 🎸 add rust fly check command #379

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lua/rust-tools/fly_check.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
local M = {}

function M.fly_check()
local params = vim.lsp.util.make_text_document_params()
vim.lsp.buf_notify(0, "rust-analyzer/runFlycheck", params)
IWANABETHATGUY marked this conversation as resolved.
Show resolved Hide resolved
end

return M
3 changes: 3 additions & 0 deletions lua/rust-tools/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ function M.setup(opts)
local lsp = require("rust-tools.lsp")
M.lsp = lsp

local fly_check = require("rust-tools.fly_check")
M.fly_check = fly_check

local move_item = require("rust-tools.move_item")
M.move_item = move_item

Expand Down
3 changes: 3 additions & 0 deletions lua/rust-tools/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ local function setup_commands()
RustMoveItemDown = {
rt.move_item.move_item,
},
RustFlyCheck = {
rt.fly_check.fly_check,
},
RustMoveItemUp = {
function()
require("rust-tools.move_item").move_item(true)
Expand Down