IDE setup and development features?

Started by Mori Bellamyover 7 years ago7 messages
#1Mori Bellamy
mori@invoked.net

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

#2Eren Başak
eren@citusdata.com
In reply to: Mori Bellamy (#1)
Re: IDE setup and development features?

Hi Mori,

There was a talk about that last year:
https://speakerdeck.com/citusdata/hacking-postgresql-with-eclipse-pgconf-eu-2017-metin-doslu

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

Show quoted text

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

#3David Fetter
david@fetter.org
In reply to: Mori Bellamy (#1)
Re: IDE setup and development features?

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

#4Tsunakawa, Takayuki
tsunakawa.takay@jp.fujitsu.com
In reply to: Mori Bellamy (#1)
RE: IDE setup and development features?

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

#5Mateusz Starzycki
mstarzycki@gmail.com
In reply to: Tsunakawa, Takayuki (#4)
Re: IDE setup and development features?

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:

Show quoted text

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

#6Amit Kapila
amit.kapila16@gmail.com
In reply to: Mori Bellamy (#1)
Re: IDE setup and development features?

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

#7Vladimir Sitnikov
sitnikov.vladimir@gmail.com
In reply to: Mori Bellamy (#1)
Re: IDE setup and development features?

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