Giter VIP home page Giter VIP logo

telescope-sg's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

telescope-sg's Issues

Empty result on every queries

Hi,

I've installed and tested the extension, but nothing it returns as a result:
image

but when I run the command in terminal, it produces results:

$ ast-grep --json -p '$A()'
...
  "file": "./static/tabbed-0.7/tabbed.c",
  "language": "C",
  "metaVariables": {
    "single": {
      "A": {
        "text": "cleanup",
        "range": {
          "byteOffset": {
            "start": 29639,
            "end": 29646
          },
          "start": {
            "line": 1371,
            "column": 1
          },
          "end": {
            "line": 1371,
            "column": 8
          }
        }
      }
    },
    "multi": {},
    "transformed": {}
  }
}
]

Config:
ast_grep: 0.9.1
NVIM v0.9.1

  ast_grep = {
      command = {
          "ast-grep",
          "--json",
          "-p",
      },
      grep_open_files = false,
      lang = nil,
  },
  ...
require("telescope").load_extension("ast_grep")

install dependency with packer

the only thing preventing me from installing this plugin is that it requires an imperatively installed global dependency (npm i -g @ast-grep/cli).

This is easy to forget when setting up a new machine (because I might have f'd up my configs again ๐Ÿ˜…).

Is there a way to get packer or sth else to install the dependency for me, in a declarative way?

HOw to setup?

I get [telescope.run_command]: Unknown command with the following config in after/telescope.lua:

require("telescope").setup {
  extensions = {
    ast_grep = {
      command = {
        "ast-grep",
        "--json=stream",
      },
      grep_open_files = false,
      lang = nil,
    },
  }
}

Not working with error: attempt to get length of local 'icon' (a nil value)

I get this error in :messages :

[telescope] [WARN  11:04:31] /Users/.../.local/share/nvim/lazy/telescope.nvim/lua/telescope/pickers.lua:489: Fin
der failed with msg:  ...lazy/telescope-sg/lua/telescope/_extensions/ast_grep.lua:99: attempt to get length of local
'icon' (a nil value)

The Telescope picker window is empty:

Screenshot 2023-10-05 at 11 10 40

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.