Query regarding code completion for NVDA addon development


Akash Kakkar
 

Thanks Nolia and David.

David, Can you please share your template?

It will probably be helpful for me in learning the stuff.

On 1/31/2023 4:31 PM, Noelia Ruiz wrote:
Hi again, regarding this topic: I've confirmed that we can work by
cloning the prepopulated workspace inside add-on repos, adding paths
to the nvda repo. This maybe more comfortable if we build the add-on
locally with add-on template.
Here's more info about VS Code:
Accessibility:
https://code.visualstudio.com/docs/editor/accessibility

Demo of VS Code with NVDA. Transcript and subtitles are available:
Demystifying VS Code on Windows with the Screen Reader NVDA - YouTube:

https://www.youtube.com/watch?v=9xIVVXLEwE8

Hope this helps

2023-01-22 21:30 GMT+01:00, Akash Kakkar <akash.a07k@...>:
Ah, Thanks Noelia.

This approach seems neat and powerful!

I'm going to use it.

Thanks a lot.


On 1/23/2023 1:55 AM, Noelia Ruiz wrote:
Hello: Another approach that seems to work is:

1. Clone NVDA's repo (and prepare the source code tree).
2. Clone the prepopulated workspace configuration for VS Code inside
the NVDA's repo:
git clone https://github.com/nvaccess/vscode-nvda.git .vscode
3. Develop add-ons inside the nvda\source\userConfig\addons folder.
Open the NVDA's folder, and relevant files, for example,
nvda\source\userConfig\addons\myAddon\appModules\myAddon.py, with VS
Code.

More info about cloning NVDA and the VS Code prepopulated workspace
configuration is available at

https://github.com/nvaccess/nvda

Hope this helps.


2023-01-22 21:15 GMT+01:00, Lubos Pintes <lubos.pintes@...>:
Hello I would try to add the NVDA source folder to workspace.

Dňa 22. 1. 2023 o 21:03 Akash Kakkar napísal(a):
Hey all,

So, I'm starting NVDA add-on development and planning to use Visual
Studio Code for this.

I want to know, that what I'm require to do in order to get the code
completion for the NVDA specific functions?

For example,

If I write:

import appModuleHandler

import speech


Will I get the code completion for all the functions and parameters
present in the appModule and speech?

If no, then is there any way to get it?

Thanks














DaVid
 

Hi. I have a folder called NVDA. On that folder, I have a cloned repo
of NVDA, and also, a folder called addons. I have all the add-ons
inside the "addons" folder, my personal add-ons and sometimes add-ons
that I would like to update for some reason.

Then, I add relative paths of the NVDA source code to the extra path
settings. I took this from a vs code template for add-ons. When I want
to create a new add-on, I copy the template. I could share my add-on
template with you, but I have a lot of things that users usually don't
need to use.
About the extra paths, the important part is here: Add this to your
workspace settings.

"python.autoComplete.extraPaths": [
"addon",
"../../nvda/source",
"../../nvda/include/comtypes",
"../../nvda/include/configobj/src",
"../../nvda/include/pyserial",
"../../nvda/include/wxPython",
"../../nvda/miscDeps/python"
],

Adapt the relative paths to your folder working structure.

Regards,
David CM.


2023-01-22 14:03 GMT-06:00, Akash Kakkar <akash.a07k@...>:

Hey all,

So, I'm starting NVDA add-on development and planning to use Visual
Studio Code for this.

I want to know, that what I'm require to do in order to get the code
completion for the NVDA specific functions?

For example,

If I write:

import appModuleHandler

import speech


Will I get the code completion for all the functions and parameters
present in the appModule and speech?

If no, then is there any way to get it?

Thanks


Noelia Ruiz
 

Hi again, regarding this topic: I've confirmed that we can work by
cloning the prepopulated workspace inside add-on repos, adding paths
to the nvda repo. This maybe more comfortable if we build the add-on
locally with add-on template.
Here's more info about VS Code:
Accessibility:
https://code.visualstudio.com/docs/editor/accessibility

Demo of VS Code with NVDA. Transcript and subtitles are available:
Demystifying VS Code on Windows with the Screen Reader NVDA - YouTube:

https://www.youtube.com/watch?v=9xIVVXLEwE8

Hope this helps

2023-01-22 21:30 GMT+01:00, Akash Kakkar <akash.a07k@...>:

Ah, Thanks Noelia.

This approach seems neat and powerful!

I'm going to use it.

Thanks a lot.


On 1/23/2023 1:55 AM, Noelia Ruiz wrote:
Hello: Another approach that seems to work is:

1. Clone NVDA's repo (and prepare the source code tree).
2. Clone the prepopulated workspace configuration for VS Code inside
the NVDA's repo:
git clone https://github.com/nvaccess/vscode-nvda.git .vscode
3. Develop add-ons inside the nvda\source\userConfig\addons folder.
Open the NVDA's folder, and relevant files, for example,
nvda\source\userConfig\addons\myAddon\appModules\myAddon.py, with VS
Code.

More info about cloning NVDA and the VS Code prepopulated workspace
configuration is available at

https://github.com/nvaccess/nvda

Hope this helps.


2023-01-22 21:15 GMT+01:00, Lubos Pintes <lubos.pintes@...>:
Hello I would try to add the NVDA source folder to workspace.

Dňa 22. 1. 2023 o 21:03 Akash Kakkar napísal(a):
Hey all,

So, I'm starting NVDA add-on development and planning to use Visual
Studio Code for this.

I want to know, that what I'm require to do in order to get the code
completion for the NVDA specific functions?

For example,

If I write:

import appModuleHandler

import speech


Will I get the code completion for all the functions and parameters
present in the appModule and speech?

If no, then is there any way to get it?

Thanks
















Akash Kakkar
 

Ah, Thanks Noelia.

This approach seems neat and powerful!

I'm going to use it.

Thanks a lot.

On 1/23/2023 1:55 AM, Noelia Ruiz wrote:
Hello: Another approach that seems to work is:

1. Clone NVDA's repo (and prepare the source code tree).
2. Clone the prepopulated workspace configuration for VS Code inside
the NVDA's repo:
git clone https://github.com/nvaccess/vscode-nvda.git .vscode
3. Develop add-ons inside the nvda\source\userConfig\addons folder.
Open the NVDA's folder, and relevant files, for example,
nvda\source\userConfig\addons\myAddon\appModules\myAddon.py, with VS
Code.

More info about cloning NVDA and the VS Code prepopulated workspace
configuration is available at

https://github.com/nvaccess/nvda

Hope this helps.


2023-01-22 21:15 GMT+01:00, Lubos Pintes <lubos.pintes@...>:
Hello I would try to add the NVDA source folder to workspace.

Dňa 22. 1. 2023 o 21:03 Akash Kakkar napísal(a):
Hey all,

So, I'm starting NVDA add-on development and planning to use Visual
Studio Code for this.

I want to know, that what I'm require to do in order to get the code
completion for the NVDA specific functions?

For example,

If I write:

import appModuleHandler

import speech


Will I get the code completion for all the functions and parameters
present in the appModule and speech?

If no, then is there any way to get it?

Thanks











Lubos Pintes
 

Agree, IMHO this is better approach and it will work.

Dňa 22. 1. 2023 o 21:25 Noelia Ruiz napísal(a):

Hello: Another approach that seems to work is:

1. Clone NVDA's repo (and prepare the source code tree).
2. Clone the prepopulated workspace configuration for VS Code inside
the NVDA's repo:
git clone https://github.com/nvaccess/vscode-nvda.git .vscode
3. Develop add-ons inside the nvda\source\userConfig\addons folder.
Open the NVDA's folder, and relevant files, for example,
nvda\source\userConfig\addons\myAddon\appModules\myAddon.py, with VS
Code.

More info about cloning NVDA and the VS Code prepopulated workspace
configuration is available at

https://github.com/nvaccess/nvda

Hope this helps.


2023-01-22 21:15 GMT+01:00, Lubos Pintes <lubos.pintes@...>:
Hello I would try to add the NVDA source folder to workspace.

Dňa 22. 1. 2023 o 21:03 Akash Kakkar napísal(a):
Hey all,

So, I'm starting NVDA add-on development and planning to use Visual
Studio Code for this.

I want to know, that what I'm require to do in order to get the code
completion for the NVDA specific functions?

For example,

If I write:

import appModuleHandler

import speech


Will I get the code completion for all the functions and parameters
present in the appModule and speech?

If no, then is there any way to get it?

Thanks











Noelia Ruiz
 

Hello: Another approach that seems to work is:

1. Clone NVDA's repo (and prepare the source code tree).
2. Clone the prepopulated workspace configuration for VS Code inside
the NVDA's repo:
git clone https://github.com/nvaccess/vscode-nvda.git .vscode
3. Develop add-ons inside the nvda\source\userConfig\addons folder.
Open the NVDA's folder, and relevant files, for example,
nvda\source\userConfig\addons\myAddon\appModules\myAddon.py, with VS
Code.

More info about cloning NVDA and the VS Code prepopulated workspace
configuration is available at

https://github.com/nvaccess/nvda

Hope this helps.


2023-01-22 21:15 GMT+01:00, Lubos Pintes <lubos.pintes@...>:

Hello I would try to add the NVDA source folder to workspace.

Dňa 22. 1. 2023 o 21:03 Akash Kakkar napísal(a):
Hey all,

So, I'm starting NVDA add-on development and planning to use Visual
Studio Code for this.

I want to know, that what I'm require to do in order to get the code
completion for the NVDA specific functions?

For example,

If I write:

import appModuleHandler

import speech


Will I get the code completion for all the functions and parameters
present in the appModule and speech?

If no, then is there any way to get it?

Thanks











Lubos Pintes
 

Hello I would try to add the NVDA source folder to workspace.

Dňa 22. 1. 2023 o 21:03 Akash Kakkar napísal(a):

Hey all,

So, I'm starting NVDA add-on development and planning to use Visual Studio Code for this.

I want to know, that what I'm require to do in order to get the code completion for the NVDA specific functions?

For example,

If I write:

import appModuleHandler

import speech


Will I get the code completion for all the functions and parameters present in the appModule and speech?

If no, then is there any way to get it?

Thanks






Akash Kakkar
 

Hey all,

So, I'm starting NVDA add-on development and planning to use Visual Studio Code for this.

I want to know, that what I'm require to do in order to get the code completion for the NVDA specific functions?

For example,

If I write:

import appModuleHandler

import speech


Will I get the code completion for all the functions and parameters present in the appModule and speech?

If no, then is there any way to get it?

Thanks