並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 27 件 / 27件

新着順 人気順

tree-sitterの検索結果1 - 27 件 / 27件

  • 「Atom」の開発者が究極のコードエディターを目指す ~「Zed」の開発が始動/「Electron」を捨て、Rust言語を採用。GPUI、tree-sitterなどで武装し、超高速なコードエディターに【やじうまの杜】

      「Atom」の開発者が究極のコードエディターを目指す ~「Zed」の開発が始動/「Electron」を捨て、Rust言語を採用。GPUI、tree-sitterなどで武装し、超高速なコードエディターに【やじうまの杜】
    • ソースコード & ドキュメントに対応したGraph RAGの実装(Tree-sitter + LightRAG)

      (module (function_definition (identifier) # ← ここに関数名「sample_func」が含まれます (parameters) (block (expression_statement (call (identifier) (argument_list (string)))))) (expression_statement (call (identifier) (argument_list)))) ノードが色々取れましたが、「function_definition」が関数、その子である「identifier」が関数名を表すため、 function_definition == 子ノード ==> identifier となっている箇所を探索すれば抽出できます(関数ではあっても「lambda」など異なる場合もあります)。 今回は上記のようにTree-si

        ソースコード & ドキュメントに対応したGraph RAGの実装(Tree-sitter + LightRAG)
      • Rustで作るtree-sitterパーサーのRubyバインディング

        大阪Ruby会議04

          Rustで作るtree-sitterパーサーのRubyバインディング
        • 「Unicode 15.0」に対応した「GNU Emacs 29.1」、高速パーサー「tree-sitter」の採用も/Windows環境ではダブルバッファリングをサポート

            「Unicode 15.0」に対応した「GNU Emacs 29.1」、高速パーサー「tree-sitter」の採用も/Windows環境ではダブルバッファリングをサポート
          • GitHub - zed-industries/zed: Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

            You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

              GitHub - zed-industries/zed: Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
            • GitHub - sourcegraph/doctree: First-class library documentation for every language (based on tree-sitter), with symbol search & more. Lightweight single binary, run locally or self-host. Surfaces usage examples via Sourcegraph.

              You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                GitHub - sourcegraph/doctree: First-class library documentation for every language (based on tree-sitter), with symbol search & more. Lightweight single binary, run locally or self-host. Surfaces usage examples via Sourcegraph.
              • tree-sitter文法入門 | フューチャー技術ブログ

                こちらはPostgreSQL Advent Calendar 2022 カレンダー2枚目・15日目の投稿となります。 前回は、@hmatsu47さんのSupabase で TCE(透過的列暗号化)を軽く試してみたでした。 はじめにこんにちは、フューチャーでアルバイトをしている齋藤です。以前は同社のインターンでSQLフォーマッタを作成していました(記事)。現在はインターン中に作成していたSQLフォーマッタをPostgreSQLの構文に対応させる作業に取り組んでいます。 このフォーマッタではSQLパーサにtree-sitter-sqlを利用していますが、対応していない構文がいくつか存在します。本記事では、未対応の構文であるBETWEEN述語を例に、tree-sitterの構文拡張の手順を紹介します。開発中のSQLフォーマッタはOSS公開予定ですので、ぜひ仲間を増やしたいという思いから記事にしま

                  tree-sitter文法入門 | フューチャー技術ブログ
                • GitHub - afnanenayet/diffsitter: A tree-sitter based AST difftool to get meaningful semantic diffs

                  You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                    GitHub - afnanenayet/diffsitter: A tree-sitter based AST difftool to get meaningful semantic diffs
                  • How to write a linter using tree-sitter in an hour

                    This article was discussed on Hacker News. This is a continuation of my last post on how to write a tree-sitter grammar in an afternoon. Building on the grammar we wrote, now we’re going to write a linter for Imp, and it’s even easier! The final result clocks in less than 60 SLOC and can be found here. Recall that tree-sitter is an incremental parser generator. That is, you give it a description o

                    • rbsのtree-sitterパーサを書いて、neovimのシンタックスハイライトに利用する - joker1007’s diary

                      皆さん型書いてますか?私はそもそもRubyを書いていません! とはいえ、最近Kaigi on RailsやRubyWorldとカンファレンスが続いていたので、ちょっとやる気を出してrbsを書くためのエコシステムに貢献しようと思い、rbs用のtree-sitterパーサを書いてみました。パーサ流行ってますからね。 github.com READMEにしたがってnvim-treesitterでパーサをインストールし、このリポジトリをneovimプラグインとしてインストールすれば、rbsのシンタックスハイライトがイカした感じになります。 しかし、しかしながらですね、これ半年ぐらい前に調べた時には誰も書いてなかったんですが、8割ぐらい書いた所で、既に別のtree-sitter-rbsがあることに気付いたんですよね……。 github.com まあ、せっかく作ったんで完全に同じ車輪の再発明だろうが、

                        rbsのtree-sitterパーサを書いて、neovimのシンタックスハイライトに利用する - joker1007’s diary
                      • Vimのすゝめ改 - Tree-sitter について

                        Vim 使いの「ブイ」(仮名)です。Vim のすゝめ改では、現代のテキストエディタについてのあらゆる話題をテーマに Vim の視点から見た話を行います。 今回のテーマは「Tree-sitter」です。 1 Tree-sitter とは? https://tree-sitter.github.io/tree-sitter/ Tree-sitter は Atom のシンタックスハイライトとしても使用されている技術であり、最近になって neovim にも Tree-sitter によるシンタックスハイライトが導入されました。 https://github.blog/2018-10-31-atoms-new-parsing-system/ https://github.com/neovim/neovim/pull/11113 従来、テキストエディタの汎用的なシンタックスハイライトには正規表現が使わ

                          Vimのすゝめ改 - Tree-sitter について
                        • Syntax-Aware Task Spawning With Tree-Sitter - Zed Blog

                          Have you ever wanted to execute code from inside Zed? Run tests, or a linter, or the compiler, or maybe a script, or a shell one-liner? Watch: What you just saw was me using Zed Tasks to execute a Go test from inside Zed, passing the name of the current function to the go test command. Tasks, as a new feature, first landed in Zed all the way back in February, in v0.124.7. But since then they've be

                            Syntax-Aware Task Spawning With Tree-Sitter - Zed Blog
                          • EmacsでTree-sitterを利用してシンタックスハイライトする

                            Emacs 29以降の設定方法 Emacs 29以降の設定方法は こちら の記事で説明しています! Tree-sitterとは Tree-sitter自体はパーサ生成ツールと、かつそれを利用して作成された様々な言語のパーサのセットのようです。 Tree-sitterのパーサを利用することで高速かつ正確なシンタックスハイライトを適用することができます。 AtomではTree-sitterをベースにしたシンタックスハイライトシステムを使用しているようです。 emacsではELisp Tree-sitterというEmacs Lispバインディングパッケージを通じてシンタックスハイライトを適用できます。 Tree-sitterそのものについての解説は下記の記事がわかりやすかったです。 インストール インストール手順に則ってElisp Tree-sitterパッケージを追加します。 併せて、tree

                              EmacsでTree-sitterを利用してシンタックスハイライトする
                            • Let's Write a Tree-Sitter Major Mode

                              Let’s Write a Tree-Sitter Major Mode Creating a standard programming major mode presents significant challenges, with the intricate tasks of establishing proper indentation and font highlighting being among the two hardest things to get right. It's painstaking work, and it'll quickly descend into a brawl between the font lock engine and your desire for correctness. Tree-sitter makes writing many m

                                Let's Write a Tree-Sitter Major Mode
                              • Tree-sitterを使ってコードベースから関数定義を抽出する

                                はじめに 大量のファイルがあるコードベースの中から関数やクラスの定義を抽出できるとそれをLLMのコンテキストに埋め込んでコード生成や読解、ドキュメント生成などに利用できます。 この記事では、Tree-sitterを使用してPHPコードから関数定義を抽出する方法を紹介します。 Tree-sitterとは Tree-sitterは高速な構文解析ライブラリで、多くのプログラミング言語に対応しています。Zedなどの多くのモダンエディタでも採用されている技術です。 実装例 Tree-sitterは各言語から呼び出せるバインディングが用意されています。 以下のNode.jsスクリプトは、指定されたディレクトリ内のPHPファイルから関数とクラスの定義を抽出します: 使い方 必要なパッケージのインストール:

                                  Tree-sitterを使ってコードベースから関数定義を抽出する
                                • Navigating config files using tree-sitter

                                  Yet another entry for tree-sitter. For those new here, I have blogged previously about using tree-sitter here and here. Here is another installment of how I use tree-sitter to simplify/speed up things for me. In this installment we are going to see how we can use tree-sitter to easily navigate around config files. When having to navigate through huge config files there are two problems that I usua

                                  • Emacs Tree-sitter custom highlighting, part 1

                                    A few years ago I blogged about custom tree-sitter-based syntax highlighting in emacs. I started out with highlighting certain keywords in red. I wanted to show the keywords that interrupt control flow: Screenshot showing syntax highlighting of keywords in black or red I highlight regular keywords (while, if) in bold. I highlight control flow interrupting keywords (return, continue) in red. That's

                                      Emacs Tree-sitter custom highlighting, part 1
                                    • Emacs 29でTree-sitterでtsxの設定をする

                                      Emacsでtsxを編集するときのいい設定がないなあないなあと思って、長年いろいろ模索 (typescript-mode に rjsx-minor-mode を併用して (define-derived-mode typescript-tsx-mode typescript-mode "TSX") して (typescript-tsx-mode-map ("<" . rjsx-electric-lt) (">" . rjsx-electric-gt)) したり)やっていたんですが、どうもインデントとかがおかしくなりがちでした。 ここにきて Emacs 29からならtree-sitterで設定できそう だとわかったのでメモします。 手順 まずmacOSでHomebrewを使っている場合は tree-sitter を次でインストールしておきます。

                                        Emacs 29でTree-sitterでtsxの設定をする
                                      • Tree-sitterでシンタックスハイライトしたコードをHTMLで出力するワンライナー - Lambdaカクテル

                                        Tree-sitterというソフトウェアがある。CとRustメインで書かれているパーサジェネレータとそれをとりまくツールである。 tree-sitter.github.io これを利用して、コードをもとにシンタックスハイライトを効かせたHTMLを生成できたのでその紹介をする。 追記(2023-05-16T10:43+09:00) Tree-sitterのアーキテクチャ Rust製CLIツール 事前準備(CLIツール) 事前準備(文法) シンタックスハイライト HTMLに出力する(その1)(追記) HTMLに出力する(その2) まとめ あわせて読みたい 追記(2023-05-16T10:43+09:00) tree-sitter単体でもHTMLを出力できたのでその旨追記した。 Tree-sitterのアーキテクチャ Tree-sitterはコアとなるソフトウェアと、各言語ごとの文法ファイル、

                                          Tree-sitterでシンタックスハイライトしたコードをHTMLで出力するワンライナー - Lambdaカクテル
                                        • syntax highlighting with tree-sitter – Tony Finch

                                          I have added syntax highlighting to my blog using tree-sitter. Here are some notes about what I learned, with some complaining. static site generator markdown ingestion highlighting incompatible?! highlight names class names styling code results future work frontmatter templates feed style highlight quality static site generator I moved my blog to my own web site a few years ago. It is produced us

                                          • Jonas Hietala: Let's create a Tree-sitter grammar

                                            One of my favorite features in Neovim is the Tree-sitter integration. It allows for fast syntax highlighting that works well even in an error state (often the case when you’re editing code), and it has additional semantics (you can differentiate between function parameters and local variables). With nvim-treesitter-textobjects you can also jump between nodes (such as ]c to jump to next class) or t

                                            • Tree Sitter and the Complications of Parsing Languages

                                              Tree Sitter and the Complications of Parsing Languages I talk about tree sitter, CEDET, and Combobulate – my "paredit-style" package that's designed to work with most programming languages. You might be surprised to hear when you visit a file in Emacs that the syntax highlighting you are shown on your screen is – most likely – a potpourri of regular expressions with a dash of functions and syntax

                                                Tree Sitter and the Complications of Parsing Languages
                                              • How to Get Started with Tree-Sitter

                                                How to Get Started with Tree-Sitter Emacs 29 introduces tree-sitter support, a powerful parsing library that enhances its understanding of source code. With this integration, Emacs gains features like precise syntax highlighting, accurate indentation and easier extensibility. Here's how you install and configure Emacs with tree-sitter support. I think it’s time to talk about how you can start usin

                                                  How to Get Started with Tree-Sitter
                                                • Using Parsers - Tree-sitter

                                                  Press ← or → to navigate between chapters Press S or / to search in the book Press ? to show this help Press Esc to hide this help Using Parsers This guide covers the fundamental concepts of using Tree-sitter, which is applicable across all programming languages. Although we'll explore some C-specific details that are valuable for direct C API usage or creating new language bindings, the core conc

                                                  • Neovim + Tree-sitter で Lua プラグインを作ってみよう | ドクセル

                                                    スライド概要 2024/05/25 のゴリラ.vim にて、Lua プラグインのライブコーディング前に事前知識として発表した資料です。 - Tree-sitter とは - Neovim は Tree-sitter をどう使っているか - Tree-sitter を活用した Neovim プラグイン

                                                      Neovim + Tree-sitter で Lua プラグインを作ってみよう | ドクセル
                                                    • Combobulate: Structured Movement and Editing with Tree-Sitter

                                                      Combobulate: Structured Movement and Editing with Tree-Sitter Combobulate is a package that adds advanced structured editing and movement to many programming modes in Emacs. Here's how it works, and how it can enrich your editing experience in Emacs. About a year ago I released an alpha – prototype, really – version of a tool I call Combobulate. I’d been using it personally for a while before I le

                                                        Combobulate: Structured Movement and Editing with Tree-Sitter
                                                      • How to write a tree-sitter grammar in an afternoon

                                                        This article was discussed on Hacker News. Every passing decade, it seems as if the task of implementing a new programming language becomes easier. Parser generators take the pain out of parsing, and can give us informative error messages. Expressive type systems in the host language let us pattern-match over a recursive syntax tree with ease, letting us know if we’ve forgotten a case. Property-ba

                                                        1