This repository contains `clojure-mode`, an Emacs major mode for editing Clojure, ClojureScript, and related languages. The system provides syntax highlighting (font-lock), indentation, navigation, and a suite of refactoring commands directly in the editor. The architecture is a single large Emacs Lisp file (`clojure-mode.el`) with an additional extra font-locking package. It defines a base `clojure-mode` derived from `prog-mode`, plus derived modes for ClojureScript, ClojureC, ClojureDart, Joker, Jank, and EDN data files. Key entry points are the mode activation functions and interactive commands like `clojure-align`, `clojure-thread`, `clojure-cycle-privacy`, etc. The indentation engine uses a backtracking algorithm that walks up the sexp tree to apply contextual indent specs (shared with `clojure-ts-mode`). Font-locking is regex-based and extensible, with special handling for docstrings, discard macros, and character literals. The package depends only on standard Emacs libraries (`cl-lib`, `imenu`, `align`, `subr-x`) and requires Emacs 27.1+.
This is a Vim plugin that provides keybindings (gS/gJ) to split single-line code constructs into multiple lines and join them back, covering 30+ languages. The architecture uses a callback-based system where per-filetype scripts register split/join callbacks in buffer-local variables, and the main engine (autoload/sj.vim) iterates through them. The codebase is modular and well-structured, with reusable utility functions for text replacement, cursor management, and parsing (e.g., sj#argparser). Each language has dedicated autoload files that implement specific transformations (e.g., hashes, blocks, if-clauses). The plugin supports customization via many settings and alignment through external plugins. It is thoroughly tested with RSpec/Vimrunner and is actively maintained.
The antlr/intellij-plugin-v4 repository is an IntelliJ IDEA plugin that provides comprehensive language support for ANTLR v4 grammar files (.g4). It offers syntax highlighting, real-time error checking, code navigation, refactoring capabilities (such as rule extraction and inlining), live parse tree preview, grammar profiling, and code generation. The plugin integrates deeply with the IntelliJ Platform SDK, implementing extension points like FileTypeFactory, ParserDefinition, SyntaxHighlighterFactory, ExternalAnnotator, StructureViewFactory, CompletionContributor, and custom tool windows. Its architecture follows a modular design where core functionality is separated into concerns such as parsing, preview, refactoring, and configuration, utilizing patterns like the adaptor pattern for ANTLR integration, background processing for UI responsiveness, and specialized token streams for incremental parsing.
This Neovim plugin provides a polished interface for invoking LSP code actions (refactorings, quickfixes, etc.) with real-time diff previews. It supports multiple picker frameworks (telescope, fzf-lua, snacks, vim.ui.select, and a custom buffer picker) and diff backends (vim, delta, difftastic, diff-so-fancy). The architecture is modular: a finder module collects actions from all LSP clients, filters and sorts them, then passes them to a configurable picker. The plugin handles action resolution (LSP resolveProvider), preview generation, and application of workspace edits. It is well-structured with base classes for pickers, previewers, and diff backends, making it easy to extend. The buffer picker is particularly sophisticated, offering hotkeys, category grouping, nested group support, and auto-preview.
GritQL is a declarative query language and CLI tool for searching, linting, and transforming source code across many programming languages (JS/TS, Python, Java, Go, Rust, Ruby, PHP, SQL, etc.). The repository implements a Rust workspace comprising a pattern-matching engine (grit-pattern-matcher) that compiles GritQL patterns into executable AST-based matchers, a CLI client (grit) with commands like `apply`, `check`, `list`, `patterns`, and `lsp`, an LSP server for IDE integration, WebAssembly bindings for browser use (playground), and Node.js NAPI bindings for programmatic access. Patterns are authored in `.grit` files or embedded in Markdown with sample-based testing. The system uses tree-sitter parsers (vendored grammars) to parse source files, supports pattern caching for performance, and includes authentication, analytics, and remote module resolution. The architecture is modular: core pattern matching is isolated in `crates/grit-pattern-matcher`, pattern compilation in `crates/core`, language support in `crates/language`, and UX in `crates/cli`. The documentation site (Next.js with Markdoc) provides an interactive playground. External dependencies include tree-sitter parsers, NAPI-RS, WebAssembly tooling, and optional LLM APIs for AI-assisted patterns.
C2Rust is a compiler toolchain that translates C99 code into unsafe Rust, then applies static analysis and refactoring to produce safer, more idiomatic Rust. The pipeline consists of four main stages: transpilation (c2rust-transpile) using a Clang-based AST exporter to produce initial Rust code; static analysis (c2rust-analyze) that infers pointer permissions and rewrites raw pointers to safe references using a Polonius-based borrow checker; refactoring (c2rust-refactor) which applies dozens of AST transformations (e.g., ownership splitting, macro collapsing, control flow reconstruction) to improve code quality; and postprocessing (c2rust-postprocess) that leverages large language models to transfer C comments and align definitions. The project also includes a cross-checking framework that instruments both C and Rust code to compare runtime behavior via hashing, a program dependence graph (PDG) builder for memory safety analysis, and dynamic instrumentation for event logging. It is primarily a CLI tool (c2rust) that orchestrates these components, with extensive integration tests on real-world C projects (nginx, curl, sqlite, ruby, python2, libxml2, zstd, lua). The codebase is substantial and actively maintained, but relies heavily on unstable rustc internal APIs and LLVM/Clang, introducing maintenance risk. Several components exhibit high craftsmanship and are reusable in isolation.
coca is a static code analysis and refactoring CLI tool written in Go, designed to assess code quality, detect bad smells, analyze dependencies, and support migration tasks (specifically Spring MVC to Spring Boot). It operates as a monolithic command-line application using the Clean Architecture pattern, with distinct layers for domain models, application logic, and infrastructure. The tool supports multiple languages including Java, Go, Python, JavaScript, TypeScript, and Groovy, leveraging ANTLR for parsing and generating ASTs for analysis. The system's primary function is to scan codebases for technical debt, architectural issues, and API definitions, outputting results in various formats (JSON, CSV, Graphviz). It includes features for bad smell detection (e.g., Long Method, Large Class), test smell analysis, and dependency usage evaluation. The architecture is modular, allowing individual analysis features to be executed independently, though the tool itself is a single binary. While the codebase demonstrates solid engineering practices with a clean separation of concerns and reusable domain models, it exhibits technical drift in its dependency ecosystem. The Go version specified (1.23) is ahead of current stable releases, and several core dependencies (e.g., spf13/cobra, gomega) are significantly outdated, creating a mismatch between the code's stated requirements and the available ecosystem versions. This suggests the project is either in a transitional state or relies on specific, potentially unstable, dependency versions.
This is the idris2-lsp language server, a monolithic LSP server implementation for the Idris2 programming language. It provides standard IDE features such as go-to-definition, hover information, code completions, document symbols, semantic tokens, diagnostics, and various code actions including case splitting, expression search, and refactoring. It runs as a single process reading JSON-RPC messages from stdin and writing responses to stdout, leveraging the Idris2 compiler's API to load modules, resolve names, and perform type-checking. The server is built with Idris2 itself and depends on the lsp-lib library for LSP message types and encoding. While the codebase is well-crafted for its domain, it is tightly coupled to Idris2 internals and the LSP protocol, making it highly specific to the Idris ecosystem and not easily reusable outside that context.
Elpy is an Emacs minor mode that provides a full-featured Python IDE within Emacs. The Python backend (elpy/ directory) implements a JSON-RPC server over stdin/stdout, using Jedi for static analysis (completions, definitions, calltips, refactoring) and external tools for formatting (autopep8, yapf, black) and linting (flake8). The Emacs Lisp frontend (elpy.el and related .el files) defines the minor mode, keymaps, modules for company-mode, eldoc, flymake, yasnippet, pyvenv, and more. The architecture is modular: each feature (completion, folding, multiedit, testing, debugging) is encapsulated in a module that can be enabled/disabled. The project is currently unmaintained with high technical drift due to dependency on evolving Jedi API and deprecated Emacs constructs.