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

Commit

Permalink
feat: 🎸 add rust fly check command
Browse files Browse the repository at this point in the history
  • Loading branch information
IWANABETHATGUY committed May 5, 2023
1 parent 71d2cf6 commit 63f8339
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
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)
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

0 comments on commit 63f8339

Please sign in to comment.