How can I refactor C++ source code using emacs?

前端 未结 9 788
孤独总比滥情好
孤独总比滥情好 2021-01-30 06:34

I\'m interested mostly in C++ and method/class name/signature automatic changes.

9条回答
  •  孤城傲影
    2021-01-30 07:23

    With the ccls or cquery, which provide the "language server protocol" (lsp), you can refactor names with:

    M-x lsp-rename

    Alternative: srefactor uses the emacs semantic-mode framework: https://github.com/tuhdo/semantic-refactor/blob/master/srefactor-demos/demos.org

    You can get it with M-x package-install from MELPA or at https://github.com/tuhdo/semantic-refactor/.

提交回复
热议问题