atom / symbols-view

Jump to symbols in Atom
MIT License
165 stars 115 forks source link

"No symbols found" for plsql sytanx with extension not ".sql" #248

Closed jpromocion closed 5 years ago

jpromocion commented 5 years ago

Only in extension ".sql" files.... It works CTRL+R. Extensions: "pks", "pkb" (language-oracle package).. not works

Version: 1.35.1

I read "https://github.com/atom/symbols-view/pull/134", but right now... not work.

NOTE: symbols-tree-view shows them

rsese commented 5 years ago

Thanks for the report! Can you fill out the issue template? The information in the template is super helpful for us when triaging issues. In particular, a sample file and specific steps to reproduce would be helpful.

jpromocion commented 5 years ago

Prerequisites

Description

Only in extension ".sql" files.... It works CTRL+R. Extensions: "pks", "pkb" (language-oracle package).. not works I read "#134", but right now... not work.

Steps to Reproduce

  1. File for "CREATE OR REPLACE PACKAGE BODY xxx", extension ".pkb"
  2. Open with Atom, with plugin language-oracle -> "PL/SQL (Oracle)". Last version -> "file-types" are not fill.
  3. CTRL+R (windows) -> "No symbols found".
  4. Copy this file, but rename with extension ".sql".
  5. Open with Atom file ".sql" -> language "PL/SQL (Oracle)".
  6. CTRL+R (windows) -> Symbols are correct and i can search.

Expected behavior: [What you expect to happen] CTRL+R search symbols for all file extensions of language "PL/SQL (Oracle)": .pks, .pkb, .vw, .plb

Actual behavior: [What actually happens] There is symbols with file extension ".sql".

Reproduces how often: [What percentage of the time does it reproduce?] Always.

Versions

S.O.: Windows 10 Pro. 64 bits. Atom: Atom: 1.35.1 Electron: 2.0.18 Chrome: 61.0.3163.100 Node: v8.9.3 apm --version: apm 2.1.3 npm 6.2.0 node 8.9.3 x64 atom 1.35.1 python 3.7.3 git 2.21.0.windows.1 visual studio

Additional Information

Install plugin "language-oracle" --> syntax "PL/SQL (Oracle)"

rsese commented 5 years ago

Sorry for the delay - I wasn't able to reproduce with a file with just the content you mentioned in step 1 (not sure if I misunderstood that step):

CREATE OR REPLACE PACKAGE BODY xxx

But I was able to get a symbol (message) showing for this example in the .sql file:

DECLARE 
   message  varchar2(20):= 'Hello, World!'; 
BEGIN 
   dbms_output.put_line(message); 
END; 

But there was no symbol for the .pkb version.

If you create a ~/.ctags file with this content, does that get things working for you?

--langmap=Sql:+.pkb
jpromocion commented 5 years ago

Don't worry. Full example:

CREATE OR REPLACE PACKAGE BODY paquete IS

  FUNCTION function1 (param NUMBER) IS
  RETURN NUMBER
  BEGIN
    RETURN NULL;
  END function1;

  PROCEDURE procedure1() IS
  BEGIN

  END procedure1;

END paquete;
/

2 symbol: "function1" and "procedure1" in file ".sql". No symbol in file ".pkb".

But, you are right, if I create a "~/.ctags" with this content.... work!!!

Thank you