Rust development environment for Emacs

Related tags

IDEs rustic
Overview

Rustic

MELPA

Table of Contents

Intro

This package is a fork of rust-mode

Differences with rust-mode:

  • flycheck integration
  • cargo popup
  • multiline error parsing
  • translation of ANSI control sequences through xterm-color
  • async org babel
  • custom compilation process
  • rustfmt errors in a rust compilation mode
  • automatic LSP configuration with eglot or lsp-mode
  • Optional rust inline documentation
  • cask for testing
  • requires emacs 26
  • etc.

Why fork ?

Installation

Simply put (use-package rustic) in your config and most stuff gets configured automatically. (use-package)

It's necessary to include elpa for a package dependency:

(setq package-archives '(("melpa" . "http://melpa.org/packages/")
                         ("gnu" . "http://elpa.gnu.org/packages/")))

If ‘spinner-1.7.3’ is unavailable” when trying to install rustic, you need to update GPG keys used by the ELPA package manager. Try installing gnu-elpa-keyring-update.

If you have rust-mode installed, ensure it is required before rustic since it has to be removed from auto-mode-alist. However you only need rust-mode if you want to use emacs-racer. There's some stuff that isn't included in rustic.

If you have any issues with rustic, please try running emacs without rust-mode loaded.

If you can't run rust-analyzer or cargo can't be found, your environment variables probably don't work in emacs. Try exec-path-from-shell to fix this.

straight

straight.el clones each of your packages directly from its source. There are good additional installation instructions for moving your package management from package.el to straight.

Compilation

Rustic defines a derived compilation-mode. Colors can be customized with several defcustoms. You can use next-error and compilation-next-error as for any other compilation buffer.

However it's possible to also jump to line numbers that are displayed at the beginning of a line. This feature is provided by a hook around compile-goto-error(RET).

Commands:

  • rustic-compile compile project using rustic-compile-command
  • rustic-recompile recompile using compilation-arguments
  • rustic-compile-send-input send string to process of current buffer

Customization:

  • rustic-compile-display-method choose function that displays the compilation buffer
  • rustic-compile-backtrace change backtrace verbosity
  • rustic-compile-command default command for rust compilation

Supported compile.el variables:

  • compilation-arguments
  • compilation-scroll-output

Faces

The colors that are displayed in compilation buffers come from cargo and are translated by xterm-color. You can change these colors by modifying rustic-ansi-faces.

rustic-compilation-mode doesn't use the default faces of compile.el. If you want to change these colors you can use something similar to:

(custom-set-faces
  '(rustic-compilation-column ((t (:inherit compilation-column-number))))
  '(rustic-compilation-line ((t (:foreground "LimeGreen")))))

Additional faces:

  • rustic-message
  • rustic-compilation-error
  • rustic-compilation-warning
  • rustic-compilation-info

rustc errors

Rustfmt

You can format your code with:

  • rustic-format-buffer format buffer with stdin
  • rustic-format-file form file and revert buffer
  • rustic-cargo-fmt run cargo-fmt on workspace

Rustic uses the function rustic-save-some-buffers for saving buffers before compilation. To save buffers automatically, you can change the value of buffer-save-without-query. In case you prefer using lsp for formatting, turn off rustic-format-on-save and set rustic-lsp-formatto t.

Customization:

  • rustic-rustfmt-bin path to rustfmt executable
  • rustic-rustfmt-config-alist alist of rustfmt configuration options
  • rustic-format-display-method default function used for displaying rustfmt buffer (use the function ignore, if you don't want the buffer to be displayed)
  • rustic-format-trigger
    • 'on-save format buffer before saving
    • 'on-compile run 'cargo fmt' before compilation
    • nil don't format automatically

edition 2018

If you are struggling with errors relating to the rust edition in cargo.toml, this may in fact be a problem with rustfmt and its default settings. To solve this, even though the error message mentions cargo.toml, you you have to put edition = "2018" in a rustfmt.toml. See here for more info.

LSP

Disable LSP support by setting rustic-lsp-client to nil. You have to restart emacs when you switch lsp clients.

Server

rust-analyzer is the default and can be changed to rls. lsp-mode related code was moved to the lsp-mode repo. rustic-lsp-server sets the value of lsp-rust-server.

(setq rustic-lsp-server 'rls)

Change rust-analyzer path.

(setq lsp-rust-analyzer-server-command '("~/.cargo/bin/rust-analyzer"))

Client

The default package is lsp-mode. But you can also use eglot.

(setq rustic-lsp-client 'eglot)

LSP commands:

xref-find-definitions

xref-find-references with helm and rust-analyzer

eglot

Turn off flymake.

(add-hook 'eglot--managed-mode-hook (lambda () (flymake-mode -1)))

lsp-mode

  • lsp-describe-thing-at-point display documentation
  • lsp-find-definition makes use of xref

You can find more information in the lsp-mode wiki.

lsp-execute-code-action

This command can be extremely convenient when applying code actions or using auto-imports.

Run lsp-execute-code-action when lsp-ui displays code actions at the top of the sideline.

Applying code actions

Auto import

Macro expansion

lsp-rust-analyzer-expand-macro expand macro call at point recursively

The results are formatted and highlighted by default, but you can use your own function by customizing lsp-rust-analyzer-macro-expansion-method.

LSP + TRAMP

rust-analyzer does work over TRAMP, but you have to register the client manually:

(with-eval-after-load "lsp-rust"
 (lsp-register-client
  (make-lsp-client
   :new-connection (lsp-stdio-connection
                    (lambda ()
                      `(,(or (executable-find
                              (cl-first lsp-rust-analyzer-server-command))
                             (lsp-package-path 'rust-analyzer)
                             "rust-analyzer")
                        ,@(cl-rest lsp-rust-analyzer-server-args))))
   :remote? t
   :major-modes '(rust-mode rustic-mode)
   :initialization-options 'lsp-rust-analyzer--make-init-options
   :notification-handlers (ht<-alist lsp-rust-notification-handlers)
   :action-handlers (ht ("rust-analyzer.runSingle" #'lsp-rust--analyzer-run-single))
   :library-folders-fn (lambda (_workspace) lsp-rust-library-directories)
   :after-open-fn (lambda ()
                    (when lsp-rust-analyzer-server-display-inlay-hints
                      (lsp-rust-analyzer-inlay-hints-mode)))
   :ignore-messages nil
   :server-id 'rust-analyzer-remote)))

(based on https://github.com/emacs-lsp/lsp-mode/blob/68fddd5d9c5506b2adf6a3f67bbe568f44563dd4/clients/lsp-rust.el#L644)

If you have Emacs 28, due to some compatibility issues, you might have to additionally use:

(defun start-file-process-shell-command@around (start-file-process-shell-command name buffer &rest args)
  "Start a program in a subprocess.  Return the process object for it. Similar to `start-process-shell-command', but calls `start-file-process'."
  ;; On remote hosts, the local `shell-file-name' might be useless.
  (let ((command (mapconcat 'identity args " ")))
    (funcall start-file-process-shell-command name buffer command)))

(advice-add 'start-file-process-shell-command :around #'start-file-process-shell-command@around)

(thanks to https://github.com/emacs-lsp/lsp-mode/issues/2514#issuecomment-759452037)

You'll have to have rust-analyzer already installed on the target machine.

Cargo

Edit

cargo-edit provides commands to edit your dependencies quickly.

The rustic commands can be called with prefix C-u if you want to modify the parameters of a command.

  • rustic-cargo-add Add crate to Cargo.toml using 'cargo add'
  • rustic-cargo-rm Remove crate from Cargo.toml using 'cargo rm'
  • rustic-cargo-upgrade Upgrade dependencies as specified in the local manifest file using 'cargo upgrade'

Test

rustic-cargo-test run 'cargo test', when called with C-u store arguments in rustic-test-arguments

rustic-cargo-test-rerun rerun 'cargo test' with arguments stored in rustic-test-arguments

rustic-cargo-current-test run test at point

Outdated

Use rustic-cargo-outdated to get a list of dependencies that are out of date. The results are displayed in tabulated-list-mode and you can use most commands you know from the emacs package menu. This option requires the rust package cargo-outdated to be installed before being used.

  • u mark single crate for upgrade
  • U mark all upgradable crates
  • m remove mark
  • x perform marked package menu actions
  • r refresh crate list
  • q quit window

Clippy

Currently cargo does not display the correct installation command for some toolchains when clippy isn't installed. If you have problems try it with rustup component add --toolchain nightly clippy.

Use rustic-cargo-clippy to view the results in a derived compilation mode.

Flycheck

In case you want to see clippy lints with flycheck, you can activate this checker and use the command flycheck-list-errors

(push 'rustic-clippy flycheck-checkers)

Turn off flycheck.

(remove-hook 'rustic-mode-hook 'flycheck-mode)

The parameters of the checker can be modified with rustic-flycheck-clippy-params and are by default configured for using unstable options that are only available on the nightly toolchains.

If you are using the stable toolchain you have to change the value:

(setq rustic-flycheck-clippy-params "--message-format=json")

lsp-mode

If you are using lsp-mode with rust-analyzer, you can set lsp-rust-analyzer-cargo-watch-command to clippy instead of activating the checker rustic-clippy.

Org-babel

Blocks run asynchronously and a running babel process is indicated by a spinner in the mode-line. It's possible to use crates in babel blocks.

Execute babel block with org-babel-execute-src-block

#+BEGIN_SRC rust :crates '((regex . "0.2"))
  extern crate regex;

  use regex::Regex;

  fn main() {
      let re = Regex::new(r"^\d{4}-\d{2}-\d{2}$").unwrap();
      assert!(re.is_match("2014-01-01"));
  }
#+END_SRC

If specific crate features are required then these can be specified with the :features argument. Note that if it is just a single feature then a string, instead of a list, will also be accepted:

#+BEGIN_SRC rust :crates '((tokio . 1.0)) :features '((tokio . ("rt-multi-thread" "time")))
  extern crate tokio;
  
  fn main() {
      tokio::runtime::Runtime::new()
          .unwrap()
          .block_on(async {
              tokio::time::sleep(tokio::time::Duration::from_millis(10)).await;
          });
  }
#+END_SRC

Supported org babel parameters:

Write to file :results file :file ~/babel-output

Customization:

  • rustic-babel-format-src-block format block after successful build
  • rustic-babel-display-compilation-buffer display compilation buffer of babel process

Spinner

In case you want to use a different spinner type you can modify rustic-spinner-type or turn it off completely with rustic-display-spinner.(Available spinner types).

inline-documentation

With some setup, it is possible to read rust documentation inside Emacs! This currently requires LSP-mode.

Prequisites

  • Install Pandoc https://pandoc.org/installing.html
  • Install cargo https://doc.rust-lang.org/cargo/getting-started/installation.html
  • Install helm-ag https://github.com/emacsorphanage/helm-ag (Optional, but highly recommended) If you do not have them, you will be prompted to install fd-find, ripgrep and cargo-makedocs when you run rustic-doc-setup. ripgrep is optional but highly recommended. If helm-ag and ripgrep is installed, those will be used by default. If only ripgrep is installed, it will be used with the emacs grep command. If neither is installed, the emacs grep command will use grep, like in the good old days. You can change this by providing your own search function by changing rustic-doc-search-function.

Usage

  • Enable rustic-doc-mode.
  • Run M-x rustic-doc-setup to download files that rustic-doc needs to convert rust documentation and also convert std.
  • You can now convert package-specific documentation with M-x rustic-doc-convert-current-package
  • Search the org files with rustic-doc-search (bound to C-# by default) if you are in Rust mode, Rustic mode or Org mode. If you hover over a symbol when you invoke the command, rustic-doc-search will insert a default value.
  • Add universal argument to only search for level 1 headers like struct or enum names.

Notes

  • We are waiting for an update to Pandoc that will make the generated documents prettier, it should be available soon https://github.com/jgm/pandoc/issues/6554
  • You should re-run rustic-doc-setup once in a while, to update the pandoc filter.
  • If rustic-doc does not find the documentation for something, the first thing to do is check the project's target/doc folder for the corresponding .html-file. If there is no file there, there is nothing for rustic-doc to convert. If there is a file there, please create an issue!

Popup

You can execute commands with rustic-popup. The list of commands can be customized with rustic-popup-commands. The command rustic-popup-default-action (RET or TAB) allows you to change:

  • RUST_BACKTRACE environment variable
  • compilation-arguments for recompile
  • arguments for cargo test

View help buffer containing a command's flags with h:

elisp tests

To run the tests, you will need Cask.

cask exec ert-runner

Contributing

PRs, feature requests and bug reports are very welcome.

Comments
  • Suspected poor performance from rustic-syntax-propertize

    Suspected poor performance from rustic-syntax-propertize

    Hello! I apologize if I'm confused or misguided here, but I believe that the rustic-syntax-propertize function is locking up emacs frequently when editing any rust source file of non-trivial size. It seems that with anything larger than about 100 lines emacs becomes pretty much unusable.

    This suddenly started happening a few weeks ago, and at first I thought it was my workstation, but then had the same thing happen after switching to another workstation, but only after upgrading my doom emacs installation. Unfortunately, I don't recall whether I updated rust/rls at the same time. I'm not proficient with emacs lisp, so from the little of the source I've looked at, it's unclear how much this function relies on rls for any functionality.

    I tracked down this function as the culprit by running the profiler in emacs; as you can see in the screenshot, it's consuming ~75% of CPU and 55% memory during my sample run; that's pretty typical over the 2 machines and several samples I've run. Specifically, rustic-ordinary-lt-gt-p seems to be the problem function.

    Screenshot from 2020-05-11 14-45-12

    As I said before, this very much outside my area of expertise, so I might be completely wrong, but I'm hitting dead-ends on trying to find any other issue in other projects that explain it, so I thought I'd bring it up here. I am running nightly rust, but I've been updating frequently since hitting this issue and the problem persists, so if that's the cause it's something more than a whoops commit.

    Setting syntax-propertize-function to nil appears to completely resolve the problem, but then you don't get formatting while editing. That's been my workaround today since tracking this down.

    help wanted feedback-needed 
    opened by brownjohnf 31
  • When run rustic-cargo-build/run,  if main.rs exist syntax error,  cursor always skip to beginning of buffer.

    When run rustic-cargo-build/run, if main.rs exist syntax error, cursor always skip to beginning of buffer.

    Following is reproduce:

    Current cursor in rs file on line 46.

    M-x run rustic-cargo-build, then cursor switch to new open compilation buffer window.

    M-x run quit-window

    my cursor in rs file on line 1.

    What i expected

    When run quit-window, cursor should go back to original position, as it did for rustic-recompile.

    thank you.

    bug compilation 
    opened by zw963 23
  • Major cleanup (whitespace, headings, warnings, circular deps)

    Major cleanup (whitespace, headings, warnings, circular deps)

    As promised in #92, here comes a major cleanup.

    1. Cleanup whitespace (same as #91 but now for all libraries).
    2. Use outline-minor-mode compatible section headings. 415e619ed4bdffe0c50d9e49b8b8676692def718
    3. Address all byte-compilation warnings (approximately 60!).
    4. Break circular dependencies between libraries. 6711095d4ce6ee876bf4af0c13aecb0188eb7ce3

    Please make sure the fixes in 1c75e74ed6b29d18ca18471275fbdcee7081f6ee are correct and don't just further hide bugs.

    Next I would like to make all libraries except rustic.el itself optional. That basically works already, but needs more testing.

    opened by tarsius 23
  • When set rustic-format-trigger to  'on-complation, format does not working when run `rustic-recompile`.

    When set rustic-format-trigger to 'on-complation, format does not working when run `rustic-recompile`.

    Thank you for offer this awesome emacs mode.

    In fact, most of feautre is just working, the only issue is, i expect to format before run rustic-compilation, but it never be triggered.

    Following is my config:

    (require 'rustic)
    (setq rustic-format-on-save nil)
    (setq buffer-save-without-query t)
    (setq rustic-format-trigger 'on-compile)
    (setq compilation-read-command nil)
    
    (setq lsp-rust-analyzer-cargo-watch-command "clippy")
    (push 'rustic-clippy flycheck-checkers)
    (setq rustic-flycheck-clippy-params "--message-format=json")
    

    What i expected is:

    When i press Ctrl+C Ctrl+C TAB to run rustic-compilation, it format my code before compilation.

    BTW:

    1. if set to on-save, it is working.
    2. run rustic-format-buffer works.

    Thank you

    bug rustfmt 
    opened by zw963 17
  • flycheck rustic-clippy clippy installation guide is wrong

    flycheck rustic-clippy clippy installation guide is wrong

    I see

    Suspicious state from syntax checker rustic-clippy: Flycheck checker rustic-clippy returned non-zero exit code 1, but its output contained no errors: error: 'cargo-clippy' is not installed for the toolchain 'nightly-x86_64-unknown-linux-gnu'
    To install, run `rustup component add clippy`
    

    I do

    % rustup component add clippy
    info: component 'clippy' for target 'x86_64-unknown-linux-gnu' is up to date
    

    but, This is not work.

    I do

    % rustup component add --toolchain nightly clippy
    info: downloading component 'clippy'
    info: installing component 'clippy'
    

    This is work.

    I can not search error message, And I can not fix error message.

    opened by ncaq 17
  • flycheck marks wrong line in workspace submodule

    flycheck marks wrong line in workspace submodule

    There seems to be a mismatch in what flycheck marks as an error and the really erroneous line. Interestingly, it happens in workspaces only. I prepared a trivial reproducible example here which visualises the issue:

    Screenshot from 2022-02-15 23-52-29

    I'm not sure if it's rustic or lsp, so I'm sorry in advance if this report went into a wrong bucket.

    bug flycheck lsp 
    opened by mbuczko 16
  • Rustic lsp is still picking up rls even though its set to rust-analyzer

    Rustic lsp is still picking up rls even though its set to rust-analyzer

    This is my configuration for rust: https://github.com/CSRaghunandan/.emacs.d/blob/master/setup-files/setup-rust.el

    I use exec-path-from-shell as well. Upon inspecting I can see that the value of rustic-lsp-server is set to rust-analyzer and the right path is set for the server command too.

    But when I open any project, it runs rls instead of rust-analyzer. I tried setting the path of lsp-rust-analyzer-server-command, but that did not help too.

    EDIT: found a way to fix this issue. I set rustic-lsp-server to nil and enabled lsp manually in a hook and that seems to have solved the issue for now. Maybe there was some changes to lsp-rust which caused this to break.

    help wanted 
    opened by CSRaghunandan 16
  • rustic-doc-setup conversion error

    rustic-doc-setup conversion error

    I'm getting the below error when trying to use rustic-doc-setup. I imagine that there may be an issue with the lua script, but perhaps its something on my side as well. I'm not familiar enough with lua myself, unfortunately.

    Error message when running `rustic-doc-setup`
    Generating org files in: /home/user/.local/share/emacs/rustic-doc/std
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    [WARNING] Duplicate identifier 'trait-implementations' at input line 27 column 150
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    [WARNING] Duplicate identifier 'trait-implementations' at input line 48 column 166
    [WARNING] Duplicate identifier 'blanket-implementations' at input line 118 column 2790
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    [WARNING] Duplicate identifier 'trait-implementations' at input line 892 column 166
    [WARNING] Duplicate identifier 'blanket-implementations' at input line 991 column 3225
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    [WARNING] Duplicate identifier 'trait-implementations' at input line 1366 column 166
    [WARNING] Duplicate identifier 'blanket-implementations' at input line 1406 column 15592
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    [WARNING] Duplicate identifier 'trait-implementations' at input line 1320 column 166
    [WARNING] Duplicate identifier 'blanket-implementations' at input line 1423 column 2692
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    [WARNING] Duplicate identifier 'trait-implementations' at input line 66 column 150
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    [WARNING] Duplicate identifier 'trait-implementations' at input line 712 column 166
    [WARNING] Duplicate identifier 'blanket-implementations' at input line 839 column 8591
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    [WARNING] Duplicate identifier 'trait-implementations' at input line 1694 column 166
    [WARNING] Duplicate identifier 'blanket-implementations' at input line 1847 column 6781
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    [WARNING] Duplicate identifier 'variants' at input line 8 column 137
    [WARNING] Duplicate identifier 'trait-implementations' at input line 14 column 140
    [WARNING] Duplicate identifier 'blanket-implementations' at input line 18 column 3799
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    [WARNING] Duplicate identifier 'trait-implementations' at input line 2 column 150
    [WARNING] Duplicate identifier 'blanket-implementations' at input line 3 column 2317
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    [WARNING] Duplicate identifier 'trait-implementations' at input line 33 column 166
    [WARNING] Duplicate identifier 'blanket-implementations' at input line 35 column 2244
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    [..............................................]
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    [WARNING] Duplicate identifier 'trait-implementations' at input line 4 column 150
    [WARNING] Duplicate identifier 'blanket-implementations' at input line 134 column 3171
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    [WARNING] Duplicate identifier 'trait-implementations' at input line 4 column 150
    [WARNING] Duplicate identifier 'blanket-implementations' at input line 134 column 4786
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    [WARNING] Duplicate identifier 'trait-implementations' at input line 3 column 150
    [WARNING] Duplicate identifier 'blanket-implementations' at input line 134 column 4221
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    [WARNING] Duplicate identifier 'associated-types' at input line 135 column 135
    [WARNING] Duplicate identifier 'required-methods' at input line 136 column 141
    [WARNING] Duplicate identifier 'provided-methods' at input line 159 column 141
    [WARNING] Duplicate identifier 'implementors' at input line 1925 column 11836
    Error running filter /home/user/.local/bin/rustic-doc-filter.lua:
    table expected, got function
    	while retrieving list
    
    bug rustic-doc 
    opened by tpeacock19 15
  • hang on save

    hang on save

    Running emacs GNU Emacs 27.1 (build 1, x86_64-w64-mingw32) with the following

    Steps to reproduce

    1. Run emacs as follows
    $ git clone https://github.com/rksm/emacs-rust-config
    $ # edit ./emacs-rust-config/init.el to remove loading of exec-path-from-shell because that doesn't work on Windows
    $ emacs -q --load ./emacs-rust-config/standalone.el
    
    1. Edit a rust file and make a change
    2. Save file

    What happens

    Emacs hangs until I press C-g then after a slight pause the file reloads with the reformatted file.

    What I expect to happen

    File saves and reloads with formatted file without hanging

    Installed packages

      company            20210224.2244 installed             Modular text completion framework
      exec-path-from-shell 20201215.33   installed             Get environment variables such as $PATH from the shell
      flycheck           20210314.2015 installed             On-the-fly syntax checking
      lsp-ui             20210317.1358 installed             UI modules for lsp-mode
      rustic             20210315.1728 installed             Rust development environment
      selectrum          20210316.835  installed             Easily select item from list
      toml-mode          20161107.1800 installed             Major mode for editing TOML files
      use-package        20210207.1926 installed             A configuration macro for simplifying your .emacs
      which-key          20210131.1837 installed             Display available keybindings in popup
      yasnippet          20200604.246  installed             Yet another snippet extension for Emacs
      bind-key           20210210.1609 dependency            A simple way to manage personal keybindings
      dash               20210308.2109 dependency            A modern list library for Emacs
      epl                20180205.2049 dependency            Emacs Package Library
      f                  20191110.1357 dependency            Modern API for working with files and directories
      ht                 20210119.741  dependency            The missing hash table library for Emacs
      lsp-mode           20210317.1031 dependency            LSP mode
      lv                 20200507.1518 dependency            Other echo area
      markdown-mode      20210220.1301 dependency            Major mode for Markdown-formatted text
      pkg-info           20150517.1143 dependency            Information about packages
      s                  20180406.808  dependency            The long lost Emacs string manipulation library.
      spinner            1.7.3         dependency            Add spinners and progress-bars to the mode-line for ongoing operations
      xterm-color        20200605.2017 dependency            ANSI, XTERM 256 and Truecolor support
    
    bug rustfmt lsp-mode 
    opened by tanj 15
  • Unable to set-up Rust-Analyzer

    Unable to set-up Rust-Analyzer

    I'm unable to use Rust-Analyzer. I've set rustic-lsp-server to rust-analyzer but when I open a rust project LSP still tries to run RLS and not the analyzer.

    What am I doing wrong?

    opened by LU15W1R7H 15
  • LSP doesn't start over Tramp

    LSP doesn't start over Tramp

    Hi,

    rustic-mode works perfectly fine locally, but when started over a Tramp session (via standard C-x C-f /ssh:something), errors out with:

    LSP :: There are no language servers supporting current mode `rustic-mode' registered with `lsp-mode'.
    This issue might be caused by:
    1. The language you are trying to use does not have built-in support in `lsp-mode'. You must install the required support manually. Examples of this are `lsp-java' or `lsp-metals'.
    2. The language server that you expect to run is not configured to run for major mode `rustic-mode'. You may check that by checking the `:major-modes' that are passed to `lsp-register-client'.
    3. `lsp-mode' doesn't have any integration for the language behind `rustic-mode'. Refer to https://emacs-lsp.github.io/lsp-mode/page/languages and https://langserver.org/ .
    

    Syntax highlighting works, but LSP doesn't start at all.

    For reference, I'm using standard Doom Emacs with no fancy plugins & no fancy configuration.

    opened by Patryk27 13
  • Make envrc mode work

    Make envrc mode work

    Propagate process-environment and exec-path to any auxiliary buffer which is created, so that envrc mode works.

    An example requirement for this is with Nix development shells via direnv. With this, the Rust compiler, rust-analyzer, et al are not on the user's default path, but only on a local path configured by direnv within the project directory.

    Two different mechanisms are used to make this work.

    1. Code which makes use of get-buffer-create or generate-new-buffer is wrapped in inheritenv

    2. A macro which wraps with-temp-buffer is used in place of that, since inheritenv does not handle that case, adapted from https://github.com/magit/magit/pull/4169

    Subsequent additions of code which creates such auxiliary buffers should do likewise.

    Additionally, LSP mode is started with lsp-deferred so that envrc has a chance to configure the path before it is required.

    This change is working for me for cargo compilation and LSP mode rust-analyzer. I am sure I'm not utilising the full surface area of rustic mode, so may have overlooked something. Feedback welcome.

    Fixes #420

    opened by tesujimath 1
  • Fix org-babel workflow when auto wrapping main function

    Fix org-babel workflow when auto wrapping main function

    This bug is easily reproducible when you use try something like this:

    let x = [1,2,3,4,5,6];
    println!("{x:?}");
    

    And then try executing it. While you will get the result properly, you could see in the Messages buffer that that would be some errors related to compilation buffer.

    And the reason is this: It tries to do rustfmt on the babel block and fails. In this fix, I just disable doing rustfmt when we have enabled automatic wrapping or when we instruct it to wrap the main function.

    Another alternative fix could be do rustfmt on the wrapped main function and the remove the wrapped main function and render it again on the babel blocks. But IMO, that's going to be very fragile.

    opened by psibi 0
  • `cargo-outdated` throws an error `wrong-type-argument stringp nil` when used in a workspace

    `cargo-outdated` throws an error `wrong-type-argument stringp nil` when used in a workspace

    Backtrace:

    Debugger entered--Lisp error: (wrong-type-argument stringp nil)
      string-match("^-" nil)
      rustic-cargo-outdated-menu-entry("client")
      mapcar(rustic-cargo-outdated-menu-entry ("futures-util       0.3.24   ---     0.3.25  Normal..." "prost              0.10.4   ---     0.11.5  Normal..." "simple_logger      2.3.0    ---     4.0.0   Normal..." "tokio              1.21.0   ---     1.24.1  Normal..." "tokio-stream       0.1.9    ---     0.1.11  Normal..." "tokio-tungstenite  0.17.2   ---     0.18.0  Normal..." "client" "================" "Name                  Project  Compat  Latest  Kin..." "----                  -------  ------  ------  ---..." "bevy                  0.8.1    ---     0.9.1   Nor..." "bevy_ecs              0.8.1    ---     0.9.1   Nor..." "bevy_prototype_lyon   0.6.0    ---     0.7.2   Nor..." "futures               0.3.24   ---     0.3.25  Nor..." "futures-util          0.3.24   ---     0.3.25  Nor..." "getrandom             0.2.7    ---     0.2.8   Nor..." "js-sys                0.3.59   ---     0.3.60  Nor..." "prost                 0.10.4   ---     0.11.5  Nor..." "prost-types           0.10.1   ---     0.11.5  Nor..." "wasm-bindgen          0.2.82   ---     0.2.83  Nor..." "wasm-bindgen-futures  0.4.32   ---     0.4.33  Nor..." "web-sys               0.3.59   ---     0.3.60  Nor..." "proto" "================" "Name         Project  Compat  Latest  Kind    Plat..." "----         -------  ------  ------  ----    ----..." "prost        0.10.4   ---     0.11.5  Normal  ---" "prost-build  0.10.4   ---     0.11.5  Build   ---"))
      rustic-cargo-outdated-generate-menu(("futures-util       0.3.24   ---     0.3.25  Normal..." "prost              0.10.4   ---     0.11.5  Normal..." "simple_logger      2.3.0    ---     4.0.0   Normal..." "tokio              1.21.0   ---     1.24.1  Normal..." "tokio-stream       0.1.9    ---     0.1.11  Normal..." "tokio-tungstenite  0.17.2   ---     0.18.0  Normal..." "client" "================" "Name                  Project  Compat  Latest  Kin..." "----                  -------  ------  ------  ---..." "bevy                  0.8.1    ---     0.9.1   Nor..." "bevy_ecs              0.8.1    ---     0.9.1   Nor..." "bevy_prototype_lyon   0.6.0    ---     0.7.2   Nor..." "futures               0.3.24   ---     0.3.25  Nor..." "futures-util          0.3.24   ---     0.3.25  Nor..." "getrandom             0.2.7    ---     0.2.8   Nor..." "js-sys                0.3.59   ---     0.3.60  Nor..." "prost                 0.10.4   ---     0.11.5  Nor..." "prost-types           0.10.1   ---     0.11.5  Nor..." "wasm-bindgen          0.2.82   ---     0.2.83  Nor..." "wasm-bindgen-futures  0.4.32   ---     0.4.33  Nor..." "web-sys               0.3.59   ---     0.3.60  Nor..." "proto" "================" "Name         Project  Compat  Latest  Kind    Plat..." "----         -------  ------  ------  ----    ----..." "prost        0.10.4   ---     0.11.5  Normal  ---" "prost-build  0.10.4   ---     0.11.5  Build   ---"))
      rustic-cargo-outdated-sentinel(#<process rustic-cargo-outdated-process> "finished\n")
    

    I suspect this is happening because the cargo project has a workspace meaning that there are some header lines such as "client" and "proto". I've attached the output of cargo outdated --depth 1 below ^1. I'm on emacs 29, using cargo-outdated 0.11.1.

    One possible solution would be to use the --format json flag to make the data easier to parse. The output is one json object per line, for each crate in the workspace. Then put each table into a separate buffer / or use something like vtable.el to put them all in the same buffer (I think this is possible from what I can tell, but not sure)

    ================ Name Project Compat Latest Kind Platform ---- ------- ------ ------ ---- -------- bevy 0.8.1 --- 0.9.1 Normal cfg(not(target_arch = "wasm32")) bevy_ecs 0.8.1 --- 0.9.1 Normal --- bevy_prototype_lyon 0.6.0 --- 0.7.2 Normal --- futures 0.3.24 --- 0.3.25 Normal --- futures-util 0.3.24 --- 0.3.25 Normal --- getrandom 0.2.7 --- 0.2.8 Normal --- js-sys 0.3.59 --- 0.3.60 Normal --- prost 0.10.4 --- 0.11.5 Normal --- prost-types 0.10.1 --- 0.11.5 Normal --- wasm-bindgen 0.2.82 --- 0.2.83 Normal cfg(target_arch = "wasm32") wasm-bindgen-futures 0.4.32 --- 0.4.33 Normal cfg(target_arch = "wasm32") web-sys 0.3.59 --- 0.3.60 Normal ---

              proto
              ================
              Name         Project  Compat  Latest  Kind    Platform
              ----         -------  ------  ------  ----    --------
              prost        0.10.4   ---     0.11.5  Normal  ---
              prost-build  0.10.4   ---     0.11.5  Build   ---
              
              server
              ================
              Name               Project  Compat  Latest  Kind    Platform
              ----               -------  ------  ------  ----    --------
              futures-util       0.3.24   ---     0.3.25  Normal  ---
              prost              0.10.4   ---     0.11.5  Normal  ---
              simple_logger      2.3.0    ---     4.0.0   Normal  ---
              tokio              1.21.0   ---     1.24.1  Normal  ---
              tokio-stream       0.1.9    ---     0.1.11  Normal  ---
              tokio-tungstenite  0.17.2   ---     0.18.0  Normal  ---
    
    opened by mishazharov 3
  • regression in rustic-format-buffer

    regression in rustic-format-buffer

    It seems the hook for compile-goto-error or something else was changed some time ago. We don't take into consideration anymore that there is no text property compilation-message contained in the error in the compilation buffer because it doesn't contain a path when it's parsed in the compilation filter. I guess there was a mechanism that took the path directly instead of the value in compilation-message. Maybe I can find it in the git history. It seems nobody is using the command anymore.

    rustfmt 
    opened by brotzeit 0
  • rustic-run-arguments does not work

    rustic-run-arguments does not work

    rustic-cargo-run when invoked from eval-expression or from pressing C-c C-c C-r or from the popup buffer does not look at the rustic-run-arguments. Also the behavior of using the compile-history variable does not make any sense because compile-history is usually set to an entire shell command like make, not a set of argument flags, so to use that feature you have to first invoke a nonsensical flag as the compile command and then use cargo run.

    bug cargo-run 
    opened by iitalics 2
Releases(3.4)
  • 3.4(Sep 18, 2022)

    • new command rustic-cargo-update
    • add missing dependencies to Cargo.toml by parsing flycheck buffer(without lsp)
    • org-babel: allow all possible toolchains
    • org-babel: new command that adds missing dependencies to :crates header argument
    Source code(tar.gz)
    Source code(zip)
  • 3.3(Aug 17, 2022)

    • rustic-cargo-add-missing-dependencies: add missing dependencies to Cargo.toml, works with lsp-mode and eglot #150 #169
    • use rustic-save-some-buffers instead of save-some-buffers in rust projects #424
    • new command rustic-cargo-install
    • Pass process-environment and exec-path through with-temp-buffer
    Source code(tar.gz)
    Source code(zip)
  • 3.2(Jun 20, 2022)

  • 3.1(May 27, 2022)

    • don't throw error for rustic compile commands when there's no Cargo.toml(allows using make files from root directory)
    • Support custom cargo check/run/build/test commands
    • Run compilation-start-hook with rustic process
    • Add cargo login command
    • Fix cargo doc commands
    • Ignore stderr on cargo cmd for workspace detection
    Source code(tar.gz)
    Source code(zip)
  • 2.7(Feb 16, 2022)

  • 2.6(Jan 30, 2022)

  • 2.5(Jan 12, 2022)

  • 2.4(Jan 7, 2022)

  • 2.3(Dec 17, 2021)

  • 2.2(Nov 26, 2021)

    • fix format on save hooks
    • allow additional format args with rustic-rustfmt-args
    • use file-name-directory in rustic-buffer-workspace to return path instead of file
    Source code(tar.gz)
    Source code(zip)
  • 2.1(Nov 12, 2021)

  • 2.0(Oct 28, 2021)

Owner
null
crispmacs is a WIP implementation of Emacs from scratch in Rust.

crispmacs is a WIP implementation of Emacs from scratch in Rust.

rust 3 Jul 31, 2022
Racer support for Emacs

Racer for Emacs This is the official Emacs package for Racer. Table of Contents Racer for Emacs Completion Find Definitions Describe Functions and Typ

null 398 Nov 30, 2022
Auto-Complete is an intelligent auto-completion extension for Emacs.

Auto-Complete is an intelligent auto-completion extension for Emacs. It extends the standard Emacs completion interface and provides an environment that allows users to concentrate more on their own work.

Emacs Auto-Complete 1.7k Dec 28, 2022
On the fly syntax checking for GNU Emacs

https://www.flycheck.org Modern on-the-fly syntax checking extension for GNU Emacs. Try it! For a more gentle introduction read the Installation instr

Flycheck 2.3k Dec 30, 2022
Rust IDE support for Atom, powered by the Rust Language Server (RLS)

IDE-Rust Rust language support for Atom-IDE, powered by rust-analyzer. Features Auto-completion Diagnostics (errors and warnings from rustc) Document

The Rust Programming Language 239 Dec 14, 2022
rust-analyzer is a modular compiler frontend for the Rust language

rust-analyzer is a modular compiler frontend for the Rust language. It is a part of a larger rls-2.0 effort to create excellent IDE support for Rust.

null 11.2k Jan 8, 2023
Rust language support in Atom - LOOKING FOR MAINTAINER, see #144

Rust language support in Atom Adds syntax highlighting and snippets to Rust files in Atom. Install Install the package language-rust in Atom (Preferen

Andreas Neuhaus 118 Oct 11, 2022
Eclipse Corrosion - Rust edition in Eclipse IDE

Eclipse Corrosion Rust edition and debug in Eclipse IDE Corrosion is a Rust development plugin for the Eclipse IDE, providing a rich edition experienc

Eclipse Foundation 194 Dec 23, 2022
RustDT is an Eclipse based IDE for the Rust programming language:

Project website: http://rustdt.github.io/ As of 2017, RustDT is no longer actively maintained, see this blog post for more information. If you are int

null 351 Aug 20, 2022
Better Rust/Cargo support for Flycheck

flycheck-rust — Flycheck for Rust This Flycheck extension configures Flycheck automatically for the current Cargo project. Setup Install from MELPA or

Flycheck 112 Sep 21, 2022
NetBeans Rust plugin

Rust NetBeans Plugin A NetBeans plugin for Rust. Linux / OSX Windows Requirements NetBeans 8.2.x Java 8+ Rust Cargo Rustup Features So far, it include

drrb 52 Oct 10, 2022
Rust plugin for the IntelliJ Platform

Rust plugin for the IntelliJ Platform Build Status Check Stable Beta Nightly Installation & Usage Available installation options and features are desc

IntelliJ Rust 4.2k Jan 2, 2023
Rust IDE

This branch contains the development of a "new ride" that maintain a small impact on the ui library. This is for a few reasons. Can customize the colo

Gustav Jansson 171 Dec 24, 2022
An IDE for Rust

Introduction SolidOak is a simple IDE for Rust. See the website for binary releases. It has the following features: An embedded copy of Neovim as its

Zach Oakes 907 Dec 29, 2022
The official Sublime Text 3 package for the Rust Programming Language

Rust Enhanced About This is a Sublime Text 3 package which supports Rust starting with version 1.0, it makes no attempt at supporting earlier incompat

The Rust Programming Language 704 Jan 7, 2023
Vim configuration for Rust.

rust.vim Description This is a Vim plugin that provides Rust file detection, syntax highlighting, formatting, Syntastic integration, and more. It requ

The Rust Programming Language 3.4k Jan 8, 2023
Rust Cargo command bindings

Vim Cargo Simple vim command bindings to quickly run cargo stuff from vim. Commands Available, mapping with their Cargo equivalant: CargoBench CargoBu

Timon Vonk 52 Dec 24, 2022
Visual Studio extension for Rust

Visual Studio extension for Rust Currently in development, and not feature complete. Stable versions are available on the Visual Studio extension gall

PistonDevelopers 697 Dec 18, 2022
Rust extension for Visual Studio 2017 with RLS support

Rust support for Visual Studio 2017 Preview Adds language support for Rust to Visual Studio 2017. Supports: code completion goto definition find all r

Zoey Riordan 111 Aug 4, 2022