# Code completion words

**URL:** <https://forum.alternetsoft.com/t/code-completion-words/310>\
**Category:** AlterNET Studio Support\
**Tags:** python, editor\
**Created:** [June 22, 2022, 8:03pm UTC](https://forum.alternetsoft.com/t/code-completion-words/310 "2022-06-22T20:03:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![OtherGuru](https://forum.alternetsoft.com/letter_avatar_proxy/v4/letter/o/606060/32.png) [@OtherGuru](https://forum.alternetsoft.com/u/OtherGuru)\
**Post date:** [June 22, 2022, 8:03pm UTC](https://forum.alternetsoft.com/t/code-completion-words/310/1 "2022-06-22T20:03:52Z")

</div>

We need our users to write python code to extend our software. We are thinking of using the code editor functionality along with PythonParser as lexer. Our users will use some APIs that we will provide and use some keywords that we will be providing (not in the file that user will be editing). I have a few questions -

1. I wanted to know how can I include these APIs and keywords for code completion and other features.
2. We would like the function arguments to be colored differently.

---

<div class="post-metadata">

**Author:** ![dmitry.medvedev](https://forum.alternetsoft.com/user_avatar/forum.alternetsoft.com/dmitry.medvedev/32/27_2.png) [@dmitry.medvedev](https://forum.alternetsoft.com/u/dmitry.medvedev)\
**Post date:** [June 24, 2022, 11:01am UTC](https://forum.alternetsoft.com/t/code-completion-words/310/2 "2022-06-24T11:01:07Z")

</div>

Hi Kapil,

I assume you refer to our own Alternet.Syntax.Parsers.Python.PythonParser here, not an LSP version, right?

It surely possible possible to extend our PythonParser with extra reswords and different highlighting for method parameters - we will provide an example shortly.

Kind regards,  
Dmitry

---

<div class="post-metadata">

**Author:** ![andrew.medvedev](https://forum.alternetsoft.com/user_avatar/forum.alternetsoft.com/andrew.medvedev/32/28_2.png) [@andrew.medvedev](https://forum.alternetsoft.com/u/andrew.medvedev)\
**Post date:** [June 27, 2022, 9:10am UTC](https://forum.alternetsoft.com/t/code-completion-words/310/3 "2022-06-27T09:10:09Z")

</div>

Hi Kapil,

I’ve uploaded a sample project here, it shows how to extend syntax highlighting to handle additional reswords and method parameters:  
[https://drive.google.com/file/d/1uT2jsbg6OjV5NrFZKb29w4BphcHvPbWd/view?usp=sharing](https://drive.google.com/file/d/1uT2jsbg6OjV5NrFZKb29w4BphcHvPbWd/view?usp=sharing)

Right now we do not display keywords in the code completion, however this should be addressed in the coming update, which we will be releasing within two weeks.

We might also extend our Classifier interface so reserved words can be specified there.

Kind regards,  
Andrew

---

<div class="post-metadata">

**Author:** ![OtherGuru](https://forum.alternetsoft.com/letter_avatar_proxy/v4/letter/o/606060/32.png) [@OtherGuru](https://forum.alternetsoft.com/u/OtherGuru)\
**Post date:** [June 29, 2022, 3:33pm UTC](https://forum.alternetsoft.com/t/code-completion-words/310/4 "2022-06-29T15:33:24Z")

</div>

It worked very well - thanks a lot. I guess this topic “How to inherit and override PythonParser to create an customized parser” needs more documentation. And I will need it as I need to make more modifications as I am competing with someone who is starting from AvalonEdit.
