Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Associate language-oracle files to SQL #134

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Associate language-oracle files to SQL #134

wants to merge 2 commits into from

Conversation

tschf
Copy link

@tschf tschf commented Dec 5, 2015

ctags supports PL/SQL.

http://ctags.sourceforge.net/languages.html

  1. PL/SQL

And also, looking at the source (one of the source clones on GitHub): https://github.com/jakedouglas/exuberant-ctags/blob/master/sql.c#L32-L41, it refers to Oracle PL/SQL.

 /*
 *  On-line "Oracle Database PL/SQL Language Reference":
 *  http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/toc.htm
 *
 *  Sample PL/SQL code is available from:
 *  http://www.orafaq.com/faqscrpt.htm#GENPLSQL
 *
 *  On-line SQL Anywhere Documentation
 *  http://www.ianywhere.com/developer/product_manuals/sqlanywhere/index.html  
 */  

When running clang --list-languages, it seems to fall under SQL. And it seems to map only to the sql extension, as from:

$ ctags --list-maps | grep SQL
SQL      *.sql

And indeed, if I have a file test.sql witth the following:

create or replace package body p1
as

    type t_1 is table of number;

    procedure bar()
    as
    begin
        null;
    end bar;

end p1;
/

Atom currently picks up the tags:

However, using another file extension, it misses out (as you would expect based on the previous info):

..

Recently, the language-oracle package was created, so I think now we could associate all files falling under that grammar to Sql?

After this change, all tags are properly picked up in the symbols view.

(on a side note, ctags doesn't currently pick up functions/procedures in a package spec - no as or end seems to be the trigger that it's looking for)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant