Coder Social home page Coder Social logo

Comments (6)

ray-x avatar ray-x commented on July 18, 2024

Hi, QiBaobin
I am not sure I understand your suggestion/concern.

This plugin does not depend on treesitter install and does not have treesitter setup file. For example, here is my treesitter setup:
https://github.com/ray-x/nvim/blob/master/lua/modules/lang/treesitter.lua

If you do not need treesitter for the plugin,
set treesitter_analysis = false The plugin will not use treesitter and fallback.

I also install nvim-treesitter-textobjects and nvim-treesitter-refactor, both works fine with navigator.

from navigator.lua.

QiBaobin avatar QiBaobin commented on July 18, 2024

@ray-x , Sorry, I didn't get it clear. I think the plugin only add those key mappings when there is a language sever exists, but there are cases that treesitter mappings also help a lot while there is no language server for that file type, for example I have installed c, lua python etc treesitter but there is none of language server for them on my system.

from navigator.lua.

ray-x avatar ray-x commented on July 18, 2024

If the problem related to key mapping.
Even if you do not have LSP enable, plugin will have mapping setup for you. Reson is some of the LSP is slow and takes a few seconds to startup, the plugin will not wait until LSP is ready.

you can set default_mapping=false so NO default key mapping will be mapped when plugin startup.

Also you can use keymaps = {{key = "gK", func = "declaration()"}}, to override specific function keymapping.

Do you want to add an option so even you only have treesitter, you still want the functions treesitter symbol been mapped and the plugin works as if LSP been enable (e.g. gT to show treesitter document symbol)?
I can check if is possible..... I had never think of that user case before.

from navigator.lua.

QiBaobin avatar QiBaobin commented on July 18, 2024

Do you want to add an option so even you only have treesitter, you still want the functions treesitter symbol been mapped and the plugin works as if LSP been enable (e.g. gT to show treesitter document symbol)?
I can check if is possible..... I had never think of that user case before.

Yes, that is! Please implement it if that's not a big change, that helps a lot!

from navigator.lua.

ray-x avatar ray-x commented on July 18, 2024

Add codes and allow treesitter part work in a minimum vimrc (without LSP)

from navigator.lua.

QiBaobin avatar QiBaobin commented on July 18, 2024

Confirmed, thanks!

from navigator.lua.

Related Issues (20)

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.