nicolashainaux / symbols-tree-nav Goto Github PK
View Code? Open in Web Editor NEWThis project forked from xndcn/symbols-tree-view
A symbols view like taglist for Atom.io
License: MIT License
This project forked from xndcn/symbols-tree-view
A symbols view like taglist for Atom.io
License: MIT License
As a followup to your comment on xndcn#167 I tried to fork your repo to add it there, but GitHub tells me I already have a fork of it (since I have a fork of your ancestor project). It may be best to wait and see if it gets pulled in there, and then pull it into your own fork. If it takes too long, I'll close my PR there and see if I can reopen it here.
Same as xndcn#161
When you have functions or variables that have too long names this one isn't showed completely.
A rapid fix for me was to update the lib/tree-view.coffee file:
@li class: 'list-nested-item list-selectable-item', title: label, =>
and
@li class: 'list-item list-selectable-item', title: label, =>
but has I'm not expert with coffee script I'm not sure this solution is good/enough for all cases.
I want to add a fallback for the outline when LSP information is not available. I think this package uses this information. So, we can merge symbols-tree-nav into atom-ide-outline to provide tree functionality for the cases where there is no LSP.
First of all good job; now I going to explain the bug jajaja.
If I hide several data types on a tab, when I switch to other tab and return to the first, over again it displays all data types.
Before switch to other tab | After switch to other tab | |
---|---|---|
EDITED : There is also another error that duplicates the functions:
I've cleaned the code to make the patch less dirty and added two icons, one for library, one for source. This way, I could get this:
(though I added a custom color for source in the .less
file:
.symbols-tree-nav {
li.list-item {
.icon-source {
color: #73a86a;
}
}
}
)
It's always possible to right-click and check/uncheck any category, to see it or not (including library and source) and to define in the "AutoHide Types" setting which categories should be checked or unchecked by default.
This is in the dev branch and I intend to push it on master and publish it.
[steps to reproduce:]
Atom: 1.15.0 x64
Electron: 1.3.13
OS: Microsoft Windows 10 Pro
Thrown From: symbols-tree-nav package 0.15.2
Uncaught TypeError: Cannot read property '0' of undefined
At C:\Users\James\.atom\packages\symbols-tree-nav\node_modules\q\q.js:126
TypeError: Cannot read property '0' of undefined
at Function.module.exports.TreeNode.TreeNode.content (/packages/symbols-tree-nav/lib/tree-view.coffee:9:8)
at /packages/symbols-tree-nav/node_modules/space-pen/lib/space-pen.js:156:31)
at Function.View.buildHtml (/packages/symbols-tree-nav/node_modules/space-pen/lib/space-pen.js:123:10)
at /packages/symbols-tree-nav/node_modules/space-pen/lib/space-pen.js:155:33)
at /packages/symbols-tree-nav/lib/tree-view.coffee:5:19)
at TreeView.module.exports.TreeView.TreeView.setRoot (/packages/symbols-tree-nav/lib/tree-view.coffee:114:23)
at /packages/symbols-tree-nav/lib/symbols-tree-nav.coffee:129:19
at _fulfilled (/packages/symbols-tree-nav/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/packages/symbols-tree-nav/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/packages/symbols-tree-nav/node_modules/q/q.js:749:13)
at /packages/symbols-tree-nav/node_modules/q/q.js:557:44
at flush (/packages/symbols-tree-nav/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
-0:23.7.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
aligner 0.22.3
atom-alignment 0.12.1
atom-beautify 0.29.17
atom-keyboard-macros 0.9.2
atom-material-syntax 1.0.2
atom-material-ui 1.3.9
atom-typescript 11.0.1
block-travel 1.0.5
busy-signal 1.3.0
coffee-compile 0.25.0
color-picker 2.2.5
custom-title-jolsen 1.0.1
figlet 0.5.4
file-types 0.5.5
file-watcher 1.1.0
git-history 3.3.0
git-log 0.4.1
git-plus 7.3.3
git-time-machine 1.5.9
highlight-selected 0.13.1
imdone-atom 2.2.2
indent-guide-improved 1.4.12
intentions 1.1.2
keyboard-scroll 0.7.0
language-apache 1.7.0
linter 2.1.2
linter-flake8 2.1.5
linter-package-json-validator 1.0.1
linter-pycodestyle 2.0.2
linter-rubocop 1.1.1
linter-ui-default 1.2.2
markdown-scroll-sync 2.1.2
merge-conflicts 1.4.4
method-separator 0.2.0
minimap 4.27.1
minimap-bookmarks 0.4.2
minimap-find-and-replace 4.5.2
minimap-highlight-selected 4.6.1
minimap-linter 2.0.0
minimap-selection 4.4.0
minimap-split-diff 0.3.7
open-recent 5.0.0
outline-selection 0.3.1
path-copy 0.14.0
perltidy 4.0.0
project-manager 3.3.4
project-view 0.6.2
python-debugger 0.2.0
python-tools 0.6.9
quick-scroll 2.1.3
remember-file-positions 0.2.2
sort-lines 0.14.0
split-diff 1.3.0
Sublime-Style-Column-Selection 1.7.4
symbols-list 2.4.0
symbols-tree-nav 0.15.2
symbols-tree-view 0.14.0
sync-settings 0.8.1
todo-show 1.11.0
trailing-spaces 0.4.0
url-encode 0.5.0
xml-formatter 0.10.0
can you add a new option "ctags args"?
i persuaded the Universal Ctags to add a new Vue parser, but now as it is still a experimental feature, i need to use ctags --extras=+g
command to use it.
Or can you add feature to use different command args for different type of file?
Or even more, can you add more configurations like
tagbar in vim to have more control in the tree-view?
let g:tagbar_type_vue = {
\ 'ctagstype' : 'mvue',
\ 'ctagsbin' : 'ctags',
\ 'ctagsargs' : '',
\ 'kinds' : [
\ 't:Template:0:0',
\ 'c:vue-command:0:0',
\ 's:Script:0:0',
\ 'v:variables:0:0',
\ 'f:function:0:0',
\ 'p:property:0:0',
\ 'e:export:0:0',
\ ],
\ 'sro' : '.',
\ 'kind2scope' : {
\ 't' : 'template',
\ 's' : 'script',
\ 'p' : 'property',
\ 'e' : 'export',
\ },
\ 'scope2kind' : {
\ 'template' : 't',
\ 'script' : 's',
\ 'property' : 'p',
\ 'export' : 'e',
\ },
\ 'sort': 0
\}
$ ./universal-ctags-linux --help
Universal Ctags 0.0.0(6232f08), Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
Compiled: May 25 2016, 09:16:25
URL: https://ctags.io/
Optional compiled features: +wildcards, +regex, +option-directory, +coproc, +xpath
Usage: universal-ctags-linux [options] [file(s)]
The shipped ctags binary is built last year,
Compiled: May 25 2016, 09:16:25
which does not support gcc "Attribute Syntax"
use this test file: test.cc
static void func(D::S* s, E e __attribute__((unused)), void* p __attribute__((unused)))
{
int i = 0;
}
static void func2(D::S* p)
{
int i = 0;
}
The tags file generated by the shipped binary:
i test3.cc /^ int i = 0;$/;" v typeref:typename:int
func2 test3.cc /^static void func2(D::S* p)$/;" f typeref:typename:void file:
The tags file generated by the newly built local binary:
func test3.cc /^static void func(D::S* s, E e __attribute__((unused)), void* p __attribute__((unused)))$/;" f typeref:typename:void file:
func2 test3.cc /^static void func2(D::S* p)$/;" f typeref:typename:void file:
For huge file, if the list of entries exceed the vertical length of the symbol panel, symbol-tree-nav should focus, highlight and centralized on the entry where the cursor is positioning into the code. At least, it could propose an option for that.
Thank you for this great plugin! Is there a way to show the symbol in the status bar/a planned feature that would allow that? That way I could see the current scope even when the nav is closed.
I write the issue here hoping that it will also be fixed somehow in symbols-tree-view.
Problem:
If you are opening a large file with a lot of tags, ctags (or the generation of the tags) is going to be REALLY slow. I think calling the process asynchronous might solve the problem.
I would solve the problem by myself but don't see that I can do it in less than four to eight weeks since I don't have the time, so any help is appreciated. If nothing is happening, I will try to implement this asap.
First: thank you for creating these new forks. :)
Perhaps this is due to the deprecation fixes or the experimental color support, not sure yet. In the original project each tree list item had a class assigned to it corresponding to its tag type, which allowed users to tweak the appearance via the styles.less, such as this stripped down example:
.symbols-tree-nav {
li.list-item {
.icon-function, .icon-method {
color: #61afef;
}
}
}
Of course, all the power of css is available, not just simply changing the font color.
Is there a way to restore this functionality or if there is a new way of doing it?
Continuation of the discussion started here.
According to this thread, there are two ways to do this: either copy the way the tree-view package does it, or make symbols-tree-nav a pane instead of a panel, like in markdown-preview package.
Hi there, I was recently added as a collaborator of symbols-tree-view
and am trying to clean up the plethora of issues and PR's that are on that repository. I found your fork after looking around some of the issues and comments on there, and I think it would be great if we could try to get your awesome upgrades to the package merged into the main package! Let me know if this is something you'd be interested in.
return s.replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"').replace(/'/g,''');
This breaks the tree.
I´ll try to look in your code lateron to find a fix for this.
When one switch to another project (using Project Manager), from a project where symbols-tree-nav is open and visible, it is necessary to toggle symbols-tree-nav twice to make its panel visible.
An exception is raised (but hidden if atom is not in dev mode) by an internal module of atom. So, still have to ensure this problem is triggered by symbols-tree-view.
maybe an additional option in setting view to ordering functions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.