google-java-format
Reformats Java source code to comply with Google Java Style. (by google)
ctags
A maintained ctags implementation (by universal-ctags)
google-java-format | ctags | |
---|---|---|
21 | 33 | |
5,416 | 6,292 | |
0.5% | 0.8% | |
8.6 | 9.7 | |
3 days ago | 10 days ago | |
Java | C | |
GNU General Public License v3.0 or later | GNU General Public License v3.0 only |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
google-java-format
Posts with mentions or reviews of google-java-format.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-04-12.
-
How to automatically format Java code similar to Rust (rustfmt)?
The code block you pasted is not at all what the Google Java Format utility would do. Don't use VSCode to handle IntelliJ's job :P
-
After a few attempts I'm officially a programmer :^)
Follow a style guide, doesn’t really matter which you choose, you’ll thank me later. This one will work automatically https://github.com/google/google-java-format
-
For Contributors to my OpenSSG
Like Prettier and ESLint in Javascript, I needed to add Java formatting and linting tools. For formatting, I looked at google-java-format, codestyle, and spotless. Since I'm not using Java framework, I can only use plugin to format my code. Although google-java-format does not support configurability, I just chose to follow Google Java format as I believe they have most common language format standard. To use google-java-format in MacOS, go to IntelliJ IDEA -> Preference (Windows: File -> Setting) and search "plugin" menu. Then, find google-java-format using search bar. Now all you need to do is to install the plugin. I didn't have to enable it, I think it needs to be enabled in some cases. You can refer to the documentation. To format your code, go to Code menu and select Reformat code or Reformat file. It will format your code.
-
Coding standards
I cloned a Maven plug-in that enforces Google code style guidelines (modifying a few things, like nesting depth): https://github.com/google/google-java-format
-
I declare as "final" every single variable whose value doesn't change. I also use "this" every time that I'm referring to an attribute, even when there's no ambiguity in not using it
They follow a rectangle rule, which is easy to follow, but can lead to ugly formatting due to excessive indentation in nested statements (which are common using protobuffers). The dart formatter was a lot nicer, and considered human friendly style instead of blindly following the rectangle rule.
-
Creating custom formatter for Java
I spent most of my development career writing simple CRUD applications, recently I read a fascinating article: http://journal.stuffwithstuff.com/2015/09/08/the-hardest-program-ive-ever-written/. It looks like a nice challenge to try creating such a tool. For sure I need first to understand how to build AST etc. I could reuse existing solutions like https://github.com/google/google-java-format, or eclipse fmt, but I would like to understand the whole process, to be able to debug all cases.
- I am about to start a war
-
Zero Config Code Formatter?
Eventually it was clear that google-java-format was pulling ahead, and it was clear that the primary reason for that was The Rectangle Rule -- a principle I'd vomited forth one day that somehow had gone the distance. Structure-revealing code turns out to be readable code, and our users kept preferring it.
- Black, the Uncompromising (Python) Code Formatter Is Stable
-
google-java-format -> Diferences, how to sync with eclipse / stream format
Looks like this was changed in version 1.7.
ctags
Posts with mentions or reviews of ctags.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-07-04.
- If you owned a nvidia tesla a100, what would you do with it?
-
NeoVim & Rust
I also recommend you https://github.com/preservim/tagbar with https://ctags.io/ installed , it will map definitions (functions, enum, struct etc..) to tags and tagbar plugin allows you to open a split window with the mapped list and navigate through your file, it also enabled more advanced features for quick navigation .
-
How do you figure out which #include a function/variable came from?
grep, Ctags, Cscope, LSP
-
Vim plugin like vscode "go to definition" function
Vim has the tag feature built-in, which allows it to jump to the tags that were found by a tool like universal ctags using :h CTRL-]. See :help tags for more information on this. Fun fact: this is the approach that Vim uses when you use :help!
-
Neovim config from scratch (Part II)
Requirements: You need to have a CTags implementation like universal-ctags installed on your system (on every system where you use vim).
-
How to check the memory usage of my plugins?
Install https://github.com/universal-ctags/ctags
-
Project reading tools
If you are heavy Vim user, you do not need anything else. For just quick browsing, simply use ctags, make sure to use universal ctags (https://ctags.io) not exuberant ctags which are no longer well maintained. Go works out of box.
-
Help me set up vim for linting and a file tree please and some other stuff
Other (built-in) tools for file navigation in Vim include: :h :ls and :h :buffer to navigate in your buffer list (i.e. the files you have loaded); everything listed in [https://vimways.org/2018/death-by-a-thousand-files/](romainl's "Death by a Thousand Files" articles in vimways); using tags by installing universal-ctags to generate the tags then using any of the commands in :h tag to navigate them; setting global marks to files you use often with m[UPPERCASE LETTER] and jumping to them with `[UPPERCASE LETTER]; :h :vimgrep…
-
Ctags and referencing static functions, is it possible?
I have good news for you. Universal Ctags, an Exuberant Ctags fork and essentially its replacement, has fixed this already:
-
Searching files or words using fuzzy finders
Vim has built-in functionality that works pretty similar to what you want. If you have a tags file (for example, using universal ctags), you can hit Ctrl-] (:h Ctrl-]) to jump to the declaration of any function under your cursor. Or, if you don't have a tags file, you can use gd (:h gd) to jump to a local declaration within the open file.
What are some alternatives?
When comparing google-java-format and ctags you can also consider the following projects:
spotless - Keep your code spotless
lsp-mode - Emacs client/library for the Language Server Protocol
palantir-java-format - A modern, lambda-friendly, 120 character Java formatter.
vscode-intelephense - PHP intellisense for Visual Studio Code
spring-javaformat
lsp - Language Server Protocol (LSP) plugin for Vim9
formatter-maven-plugin - Formatter Maven Plugin
nvim-lspconfig - Quickstart configs for Nvim LSP
black - The uncompromising Python code formatter
coc.nvim - Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
fmt-maven-plugin - Opinionated Maven Plugin that formats your Java code.
vim-gutentags - A Vim plugin that manages your tag files
google-java-format vs spotless
ctags vs lsp-mode
google-java-format vs palantir-java-format
ctags vs vscode-intelephense
google-java-format vs spring-javaformat
ctags vs lsp
google-java-format vs formatter-maven-plugin
ctags vs nvim-lspconfig
google-java-format vs black
ctags vs coc.nvim
google-java-format vs fmt-maven-plugin
ctags vs vim-gutentags