Giter Site home page Giter Site logo

nppgtags's People

Contributors

chcg avatar pnedev avatar zapati avatar

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nppgtags's Issues

Auto expand all folds

A nice option would be to have auto-expand all folded code in the pop-up window automatically after a new lookup.

New Universal Ctags version available

Hi, I noticed that your Universal Ctags latest included version is the following:

Universal Ctags 0.0.0, Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Jan  1 2016, 11:12:30
  URL: https://ctags.io/

It seems that a new Universal Ctags has been very recently released here:

https://github.com/universal-ctags/ctags-win32/releases

Just in case you would think about integrating it on your next release. Maybe it adds compatibility with many other programming languages.

Double click Search Result Does not open source file

I try to double click search result windows but it does not open the source file

From the document /guide:

Double-clicking, hitting Space or Enter on search result line will take you to the source location. You can also do that by left-clicking on the highlighted searched word in the result line. Your currently edited document location will be saved - use Go Back command to visit it again. You can 'undo' the Go Back action by using Go Forward command. By using the mouse or the arrow keys you can move around result lines and you can trigger new searches directly from the results window (same rules about the searched string apply).

Right clicking or hitting ESC will close the currently active search results tab.

When i do "Find definition" it do show the seach result but when Double click search result it does not open the source file.

I tested with Notepad++8.4.2 (64 bit) on Windows 10.

Add keyword shortcuts to loop through NppGTags search results

It would be cool to have two customizable keyboard shortcuts which could be assigned to:

  • Go to next search result
  • Go to previous search result

The NppGTags search results panel should show the actually selected item by highlighting the corresponding row at every activation of the shortcut (it already happens when manually clicking on the results).

Add option to make "Find Definition" case insensitive

Wish there were a way to have Find Definition work case-insensitively. For example; doing Find Definition on the string "test_def" would ideally show the definition of "test_def" and "TEST_DEF". This would be useful for browsing poorly-written code in case-insensitive languages, like VHDL.

Add command Go To File/Definition/Reference

Any chance add that commands? They would automatically move to the indicated place, without opening bottom find panel where we must manually select correct hint.
If we need only fast go/back between different places in our code it would be a good improvement.

I get nothing when "Find Reference"

I use nppgtags to browser c source code. I have created gtags file in the root direction, but when I the try to "Find Refernece" of a symbol, I got nothing. Here is the screenshot.

How to add .pc extension to C source file indexing?

I have a C project folder. some of them have extension .pc and I want those files to be index as C source code then how can I do it?
for ctags I can use --langmap=C++:+.pc option to include the file.

How can include this for NppGtags?

Add more details to the search result window

Eclipse, when searching for references in a C++ project, shows the following information:

1- Text of the line where the hit has occurred
2- Hit highlighted in bold with a different color
3- Line number of the hit
4- File in which the hit has occurred
5- Name of the function where the hit has occurred
6- Number of hits for each file in which the hit has occurred (format: +main.c (21 matches), +main.h (13 matches)... + is the button to expand/collapse the search results tree)

It appears that NppGTags is correctly implementing point 1 to 4, but it would be very nice to also add point 5 (and maybe 6).

DLL name returned has first letter cut off

The call:

data.pszModuleName = DllPath.GetFilename();

sets the module name that gets written to Notepad++ 'config.xml' file. However, the call goes to:

nppgtags/src/Common.cpp

Lines 771 to 783 in ef75856

const TCHAR* CPath::GetFilename() const
{
size_t len = Len();
for (; len > 0; --len)
if (_buf[len - 1] == _T('\\') || _buf[len - 1] == _T('/'))
{
++len;
break;
}
return &_buf[len];
}

where line 778 is wrong - it adds one back to the index of the array (0-based) but you're starting from a Len() (1-based). This results in the following line in Notepad++ 'config.xml' file:

            <PluginDlg pluginName="ppGTags.dll" id="0" curr="3" prev="-1" isVisible="no" />

Missing the leading N.

Cheers.

ctags' extend is not supoort in windows

I extend ctags to support our DSL.

# pattern list
--langdef=t2k_plist
--map-t2k_plist=+.plist
--kinddef-t2k_plist=g,Pattern,Pattern
--regex-t2k_plist=/^Pattern[ \t]*([a-zA-Z0-9_]+)/\1/g/

and save those content to ctags config file.
when I run ctags from command line, it works.

but when I run npptags from notepad++(change setting to ctags), it's not work.

could you please check it?

thanks.

Improve automation of database creation

Actually, this is the popup shown when the database is missing:

image

Maybe it would be cool to add a database creation option to the popup? For example:

Title : Gtags database not found. Do you want to create it?
Answers: Yes | No

This would appear everytime a user is trying to do some actions which would involve the existence of a database. Just a little idea.

setting to disable error messages

Feature request: ability to disable alert dialogs from parsing errors. The parsing isn't always perfect and with a large enough codebase there's sure to be lines that are either formatted exotically enough or use newer language syntax that they trip up the parser and result in errors like this:
Untitled
It would remove a huge annoyance to be able to suppress these messages!

I use this plugin often, thank you for maintaining.

store database in user folder

Is it possible to move generated files of the database in a user folder ?
The aim is to keep a repository clean when this reporistory is parsed by nppgtags.

example
C:\Users\XXXXXX\AppData\Roaming\Notepad++\plugins\nppgtags\GPATH_1
C:\Users\XXXXXX\AppData\Roaming\Notepad++\plugins\nppgtags\GRTAGS_1
C:\Users\XXXXXX\AppData\Roaming\Notepad++\plugins\nppgtags\GTAGS_1
C:\Users\XXXXXX\AppData\Roaming\Notepad++\plugins\nppgtags\GPATH_2
C:\Users\XXXXXX\AppData\Roaming\Notepad++\plugins\nppgtags\GRTAGS_2
C:\Users\XXXXXX\AppData\Roaming\Notepad++\plugins\nppgtags\GTAGS_2
......
C:\Users\XXXXXX\AppData\Roaming\Notepad++\plugins\nppgtags\GPATH_x
C:\Users\XXXXXX\AppData\Roaming\Notepad++\plugins\nppgtags\GRTAGS_x
C:\Users\XXXXXX\AppData\Roaming\Notepad++\plugins\nppgtags\GTAGS_x

Consider adding native Scintilla Autocomplete

Would you consider adding an option (perhaps a checkbox in settings) to use Scintilla autocomplete instead of a plugin "native" version? This would mean that simply typing would also trigger autocompletes (so long as enabled in Notepad++) for tag database items.

Scintilla autocomplete has a lot to be desired and there is not way to integrate with the already existing Notepad++ autocomplete features, but with Scintilla autocomplete, it would "just happen" when typing vs. having to setup yet another shortcut key for autocompletion.

I do something similar in (my fork of) TagLeet.

Cheers.

Additional infos on readme

Doesn't it make sense to add the link to the win32 libs (http://adoxa.altervista.org/global/) directly to the readme. I was not able to find that link on the GNU page.
Current version is 6.6.9. How is your strategy on updating these? Might be also of interest to add the currently used version to the readme if someone is missing a new feature/bugfix.

NppGTags not works in windows 10

The NppGTags not works in windows 10 64-bit, however the same environment (NPP 7.7.1 64-bit and NppGTags 4.4.2) works well in Win 7.

Could you add windows 10 support?
Thanks.

Occur "vector<T> too long" with Notepad++ 8.4 and later

I got "vector too long" warning dialog on Npp 8.4 and later when I use "Find definition" of NppGTags, but 8.3.3 is work fine, Wish who can help fix that, this is good plugin for me.

image

Notepad++ v8.4.2 (32-bit)
Build time : May 29 2022 - 16:45:17
Path : C:\Program Files (x86)\Notepad++\notepad++.exe
Command Line : โ€œ\MXUSER4\www\StockCafe\Workplace.nppโ€
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 21H2
OS Build : 19044.1766
Current ANSI codepage : 950
Plugins :
NppGTags (4.5)

Python 3 and pygments-parser.py

On Python 3, the pipe between pygments-parser.dll and pygments-parser.py will not work.
Because the dll create Ansi Pipe, pygments-parser.py uses stdin.readline(), but on Python3, stdin.readline() read Unicode chars.
Please test them.
Thanks.

Add more settings and functions to the search result window

Actually when searching for a reference, the results are always shown in a collapsed tree. Please add a setting to change this behavior.
For example, in many cases it would be better to always show the search result tree already expanded.

Two customizable shortcuts for expanding/collapsing the search results tree would also be nice.

forward backward list

It would be nice to be able to see a window of of the tags stack. Like I start at a top layer of code then follow the calling sequence down 10 levels it would be nice to see that list or stack.

Results windows auto-expand option

Add an option that enable or disable auto expansion of results windows.

For "find reference" function, the results is supposed to be short. It could be nice that the result is directly visible

Cheers

Parsing of XML files

I'm not sure this would be actually doable in NppGTags, but here I go. I was trying to index this XML file:

<?xml version = "1.0" encoding = "utf-8"?>

<!-- planes.xml - A document that lists ads for 
                  used airplanes -->

<!DOCTYPE planes_for_sale SYSTEM "planes.dtd">
<planes_for_sale>
   <ad>
      <year> 1977 </year>
      <make> &c; </make>
      <model> Skyhawk </model>
      <color> Light blue and white </color>
      <description> New paint, nearly new interior,
            685 hours SMOH, full IFR King avionics </description>
      <price> 23,495 </price>
      <seller phone = "555-222-3333"> Skyway Aircraft </seller>
      <location>
         <city> Rapid City, </city>
         <state> South Dakota </state>
      </location>
   </ad>
   <ad>
      <year> 1965 </year>
      <make> &p; </make>
      <model> Cherokee </model>
      <color> Gold </color>
      <description> 240 hours SMOH, dual NAVCOMs, DME, 
                new Cleveland brakes, great shape </description>
      <seller phone = "555-333-2222"  
              email = "[email protected]">
              John Seller </seller>
      <location>
         <city> St. Joseph, </city>
         <state> Missouri </state>
      </location>
   </ad>
</planes_for_sale>

but it seems that NppGTags doesn't detect any tag (the same applies to tag values, and so on). I don't know if this classifies as an issue or not, I was just curious to know if there was a way to index the nodes, id's, and values of an XML file with NppGTags, given that Pygments allegedly seems to support that:

http://pygments.org/docs/lexers/

[Question] Update database outside of NppGtags

It's possible to manually update database by using cmd and get the same result as NppGtags generate (ctags parser)?
Let say I have that folders and files:
D:\Notepad++\plugins\NppGTags\ << here sits all bin/dll/conf files
D:\project\ << root of my code where all database files exist.
Now I want run in cmd bin file from Notepad++ and update database in project. But I don't know what bin file should invoke and how to indicate the source and output as argument.
I don't want update database from NppGtags options because before that action I have to do some other actions and I would prefer to automate all of them.

User selectable folder to store the created databases

The actual implementation of NppGTags consists in creating the database file in the project's root.

It would be nice to store the database files in a user selectable folder, not necessarily residing in the project path.

Add some functions to the "Search in results" panel

It would be extremely useful to transform the search result window so that it could behave like this:

Automatically filtering of search results when typing the search expression

Example:

Let's consider a search result of this kind:

Find Symbol "CLR" (literal, match case) in "C:\Encoder\"
	CRC_Check.vhd
		line 131:	CLR		: in std_logic;
		line 201:	CLR		=> IMAGELINESTART,
	CRC_Encoder.vhd
		line 42:	CLR		: in std_logic;
		line 63:	if (CLR = '1') then

If I type the character "=" in the filter box, then the results would become:

Find Symbol "CLR" (literal, match case) in "C:\Encoder\"
	FCA_Check.vhd
		line 201:	CLR		=> FCALINESTART,
	FCA_Encoder.vhd
		line 63:	if (CLR = '1') then

If I also add a ">" to the filter box appending it to the already typed "=", it would automatically become:

Find Symbol "CLR" (literal, match case) in "C:\Encoder\"
	CRC_Check.vhd
		line 201:	CLR		=> IMAGELINESTART,

So this kind of filtering would be useful for example to look for special code statements (for example, ports, signal assignments, arrays, defines...).

Moreover, an option could be added to save some user customizable filters which could be used between sessions (for example by selecting them through a listbox).

Finally, it would be great to make the selected filter persistent so that at every search, the results are automatically filtered, if chosen to do so.

This would make NppGTags code browsing even more powerful, in my opinion.

Results widow closes (ncorrectly) when clinging a result if mouse buttons are swapped.

A recent addition to nppGtags posting three key-up events and one mouse-up event causes the results window to always close, incorrectly, when navigating to a search result. A significant inconvenience.

The code at issue is:

`void ResultWin::releaseKeys()
{
INPUT inputs[4] = {};
ZeroMemory(inputs, sizeof(inputs));

inputs[0].type = INPUT_KEYBOARD;
inputs[0].ki.wVk = VK_SHIFT;
inputs[0].ki.dwFlags = KEYEVENTF_KEYUP;

inputs[1].type = INPUT_KEYBOARD;
inputs[1].ki.wVk = VK_CONTROL;
inputs[1].ki.dwFlags = KEYEVENTF_KEYUP;

inputs[2].type = INPUT_KEYBOARD;
inputs[2].ki.wVk = VK_MENU;
inputs[2].ki.dwFlags = KEYEVENTF_KEYUP;

inputs[3].type = INPUT_MOUSE;
inputs[3].mi.dwFlags = MOUSEEVENTF_LEFTUP;

SendInput(ARRAYSIZE(inputs), inputs, sizeof(INPUT));

}`

The issue is that the LEFTUP is always sent even when the actual button is the right button.

The fix (tested to work) is to set the correct event flag based on the button swapping state, like:

inputs[3].mi.dwFlags = GetSystemMetrics(SM_SWAPBUTTON) ? MOUSEEVENTF_RIGHTUP : MOUSEEVENTF_LEFTUP;

Support for excluding certain sub paths from tag generation.

To improve tagging speed it would be nice if there was a way to exclude sub paths from tag generation instead of just search results. Not sure if this is something that can be accomplished in nppgtags or requires changes in Universal CTags

As a bit of justification, a project I work on takes about 45min to tag (and generates a ~2GB tag file) being able to exclude chunks of the source tree I don't care about would speed up tagging significantly.

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.