Thread: IDE setup and development features?

IDE setup and development features?

From
Mori Bellamy
Date:
Hi all,

I'd like a few features when developing postgres -- (1) jump to definition of symbol (2) find references to symbol and (3) semantic autocompletion.

Was wondering if anyone has had luck getting these three set up for any IDE or editor configuration? Personally, I can confirm vim + ctags seems to work for (1).

--
Thanks,
Mori

Re: IDE setup and development features?

From
Eren Başak
Date:

On Tue, Oct 9, 2018 at 2:39 PM Mori Bellamy <mori@invoked.net> wrote:
Hi all,

I'd like a few features when developing postgres -- (1) jump to definition of symbol (2) find references to symbol and (3) semantic autocompletion.

Was wondering if anyone has had luck getting these three set up for any IDE or editor configuration? Personally, I can confirm vim + ctags seems to work for (1).

--
Thanks,
Mori

Re: IDE setup and development features?

From
David Fetter
Date:
On Tue, Oct 09, 2018 at 02:39:42PM -0700, Mori Bellamy wrote:
> Hi all,
> 
> I'd like a few features when developing postgres -- (1) jump to definition
> of symbol (2) find references to symbol and (3) semantic autocompletion.
> 
> Was wondering if anyone has had luck getting these three set up for any IDE
> or editor configuration? Personally, I can confirm vim + ctags seems to
> work for (1).

vim + ctags + cscope gets me to (2)

Ctags:

    https://twitter.com/davidfetter/status/1013192487341441024

Cscope:
    
    https://github.com/chazy/cscope_maps/blob/master/plugin/cscope_maps.vim

Semantic Autocompletion: I've heard good things about YCM, but I haven't tried it out yet.

    http://valloric.github.io/YouCompleteMe/

Best,
David.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


RE: IDE setup and development features?

From
"Tsunakawa, Takayuki"
Date:
From: Mori Bellamy [mailto:mori@invoked.net]
> I'd like a few features when developing postgres -- (1) jump to definition
> of symbol (2) find references to symbol and (3) semantic autocompletion.

For 1), you can generate tags like:

[for vi]
$ src/tools/make_ctags
[for Emacs]
$ src/tools/make_etags

Cscope works for 2).


Regards
Takayuki Tsunakawa


Re: IDE setup and development features?

From
Mateusz Starzycki
Date:
I have also heard god things about rtags but havent used it yet.

I have used the YCM and I must say as much as sometimes it is pain to set up right, it is well worth it.

On Wed, Oct 10, 2018 at 2:28 AM Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com> wrote:
From: Mori Bellamy [mailto:mori@invoked.net]
> I'd like a few features when developing postgres -- (1) jump to definition
> of symbol (2) find references to symbol and (3) semantic autocompletion.

For 1), you can generate tags like:

[for vi]
$ src/tools/make_ctags
[for Emacs]
$ src/tools/make_etags

Cscope works for 2).


Regards
Takayuki Tsunakawa

Re: IDE setup and development features?

From
Amit Kapila
Date:
On Wed, Oct 10, 2018 at 3:10 AM Mori Bellamy <mori@invoked.net> wrote:
>
> Hi all,
>
> I'd like a few features when developing postgres -- (1) jump to definition of symbol (2) find references to symbol
and(3) semantic autocompletion.
 
>

If you are using a Windows environment, then I think you can get all
these things without much hassle.  I use MSVC2017 for development
purpose and all these things work by default.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com


Re: IDE setup and development features?

From
Vladimir Sitnikov
Date:
Mori>Was wondering if anyone has had luck getting these three set up for any IDE or editor configuration? 

Just a data point: CLion + CMake work just great.

Step by step (just checked in macOS):
1) "Check out from Version Control" -> Git -> https://github.com/stalkerg/postgres_cmake.git -> clone
2) CLion asks if it should open CMakeLists.txt -> yes
3) Wait a bit 
4) That's it

It results in quite good IDE support for PostgreSQL code: jump to definition, find references, great autocomplete, parameter hints (including the ones for macros), refactoring (e.g. function rename with update of the references).
It imports run/debug configurations from CMake as well, so one can run and debug tests/binaries right after project import.

Vladimir