GithubHelp home page GithubHelp logo

autodesk-autocad / autolispext Goto Github PK

View Code? Open in Web Editor NEW
83.0 12.0 30.0 33.12 MB

Visual Studio Code Extension for AutoCAD® AutoLISP

Home Page: https://marketplace.visualstudio.com/items?itemName=Autodesk.autolispext

License: Apache License 2.0

TypeScript 35.35% JavaScript 0.17% Shell 0.05% Python 0.25% NewLisp 0.13% C# 8.19% Batchfile 0.01% Common Lisp 55.73% Clean 0.11%
autolisp autocad vscode-extension

autolispext's Introduction

Visual Studio Code Extension for AutoCAD® AutoLISP

简体中文

This extension adds support for AutoCAD AutoLISP source (LSP) files to Visual Studio Code. It allows you to edit and debug your lisp programs with AutoCAD 2021 and later. For information on creating lisp programs for AutoCAD with the AutoLISP programming language, see the:

The extension is open source and distributed under Apache License v2.0.

Your feedback is highly appreciated! Should you have any suggestions, please create an issue here.

Recent Updates

See the change log for recently added new features.

Features

  1. AutoLISP Debugger

    • Launch/Attach Debug
    • Debug console
    • Breakpoints
    • Step In/Out/Over
    • Variables
    • Callstacks
    • Break on error
  2. AutoLISP Editor

    • Syntax highlight
    • Autocompletion and code snippets
    • Smart bracket
    • Document/selection formatting using narrow or wide style
    • Auto indent
    • Easy access to online documentation through the context menu (selection sensitive)
    • Go to definition
    • Insert code region
    • Generate documentation for user defined function
    • Rename symbol
    • Go to references
    • Quick help on mouse hover
    • Add @Global in comment to expose symbol to workspace aware operations
  3. AutoLISP Project

    • Open a project (.prj)
    • Create a project
    • Add .lsp files into a project
    • Remove files from a project
    • Find & Search in a project

Getting started

  • Step 1. Install a supported AutoCAD release on your system.
  • Step 2. Install this extension.
  • Step 3. Open a folder that contains the AutoLISP source (LSP) files you want to work on. Or open an Autolisp project file via VSCODE side bar.
  • Step 4. Open a LSP file to modify or debug.
  • Step 5. Choose a debug configuration and start debugging the current LSP file.

Installation

This extension can be installed through the Extension panel within VS Code. Search for AutoCAD AutoLISP Extension. You can also install this extension by entering the following into the VS Code Open Command Palette...(click View > Command Palette... or press Ctrl+SHIFT+P): ext install autodesk.autolispext

Platform support

Windows Mac Linux
x

How to use the extension

To debug an AutoLISP source file:

  1. Open a LSP file.
  2. Click Run > Start Debugging (or press F5).
  3. Then choose one of the following debug configurations:
    • AutoLISP Debug: Launch – Launches a new instance of the AutoCAD application to debug the current LSP file.
    • AutoLISP Debug: Attach – Allows you to attach to a running instance of the AutoCAD application to debug the current LSP file. If prompted, specify the absolute path to the AutoCAD executable (acad.exe on Windows or AutoCAD on Mac).

Note: To avoid specifying this path each time you click Run > Start Debugging (or press F5), this path is automatically saved with the extension. For additional information on configuring the extension, see How to Configure the AutoCAD Path.

How to Configure the AutoCAD Path

  1. In Visual Studio Code, click File > Preferences > Settings.
  2. Under the User tab, expand Extensions and click AutoCAD® AutoLISP Configuration.
  3. Update the Debug: Attach Process setting with the process name in which to filter on during Debug Attach.
  4. Update the Debug: Launch Program setting to specify the path of the AutoCAD executable to use with Debug Launch.
  5. Update the Debug: Launch Parameters setting to specify the AutoCAD startup parameters.

Note: In the following examples, be sure to substitute the path with that of the AutoCAD application installed on your workstation.

Example (on Windows):

  • Launch Program: C:\Program Files\Autodesk\AutoCAD <release>\acad.exe
  • Attach Process: acad

Example (on Mac OS):

  • Launch Program: /Applications/Autodesk/AutoCAD <release>/AutoCAD <release>.app/Contents/MacOS/AutoCAD
  • Attach Process: AutoCAD

For more information, see the documentation online.

Notes

  1. Other AutoLISP extensions may conflict with this extension. If you are unable to set a breakpoint in a LSP file or you can’t use the launch/attach debug configurations, you should disable or uninstall all other AutoLISP extensions.
  2. When using this extension on Mac® OS, the "Launch Program" attribute in extension setting should be ".../AutoCAD <release>.app/Contents/MacOS/AutoCAD" rather than the absolute path of AutoCAD <release>.app.
  3. For AutoCAD specialized toolsets or OEM-based products, the product name might not be the same as AutoCAD or acad.exe. To use this extension with those products, set the value of the "Launch Program" attribute in extension setting based on the product you want to debug with.
  4. If you launch AutoCAD as an administrator, you should start Microsoft Visual Studio Code as an administrator as well. Otherwise, Microsoft Visual Studio Code will be unable to locate the AutoCAD process for attach debug.

Legal

Visual Studio Code Extension for AutoCAD® AutoLISP © 2020 Autodesk, Inc. All rights reserved.

Privacy

To learn more about Autodesk’s online and offline privacy practices, please see the Autodesk Privacy Statement.

Trademarks

The license does not grant permission to use the trade names, trademarks, service marks, or product names of Autodesk, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of any notice file. Autodesk, the Autodesk logo, AutoCAD and AutoLISP are registered trademarks or trademarks of Autodesk, Inc., and/or its subsidiaries and/or affiliates in the USA and/or other countries. All other brand names, product names, or trademarks belong to their respective holders. Autodesk is not responsible for typographical or graphical errors that may appear in this document.

All other brand names, product names or trademarks belong to their respective holders.

Third-Party Trademarks, Software Credits and Attributions

See here.

AutoCAD® AutoLISP Visual Studio Code 扩展

English

这是一个 Visual Studio Code 扩展,用来支持在 VSCode 中编写 AutoCAD AutoLISP 源文件(LSP)。它允许您使用 AutoCAD 2021 及更高版本编辑和调试 lisp 程序。有关使用 AutoLISP 编程语言为 AutoCAD 创建 lisp 程序的信息,请参见:

该扩展开源,在 Apache License v2.0 下发布。

非常感谢您的反馈!如果您有任何建议,请在此处创建一个 Issue。

最近更新

有关最近添加的新功能,请参阅 更改日志

特性

  1. AutoLISP 调试
    • 启动/附着调试
    • 调试控制台
    • 断点
    • 单步调试/单步跳出/单步跳过
    • 变量
    • 调用堆栈
    • 出错时跳出
  2. AutoLISP 编辑器
    • 语法高亮
    • 代码补全、代码片段
    • 智能括号
    • 代码格式化(紧凑或宽松)
    • 自动缩进
    • 通过上下文菜单轻松访问在线文档(选择敏感)
    • 转到定义
    • 插入代码区域
    • 为自定义函数生成注释
    • 重命名符号
    • 转到引用
    • 鼠标悬停显示帮助
    • 在注释中添加 @Global 以将符号公开给工作区感知操作
  3. AutoLISP 项目
    • 打开项目(.prj)
    • 创建项目
    • 将 .lsp 文件添加到项目
    • 从项目中删除 .lsp 文件
    • 在项目中搜索/查找

开始

  1. 在系统上安装受支持的 AutoCAD 版本。
  2. 安装此扩展。
  3. 打开要处理的 AutoLISP 源程序(LSP)文件所在的文件夹。或者通过 VSCode 侧栏打开 AutoLISP 项目文件。
  4. 打开要修改或调试的 LSP 文件。
  5. 选择调试配置,并开始调试当前 LSP 文件。

安装

可以通过 VSCode 中的扩展面板搜索并安装此扩展。搜索 AutoCAD AutoLISP Extension。 也可以通过在 VSCode 命令面板中输入以下命令来安装此扩展:依次单击视图 > 命令面板…(或按 Ctrl+Shift+P)> 键入 ext install autodesk.autolispext 后回车。

支持平台

Windows Mac Linux
x

如何使用

  1. 打开一个 LSP 文件。
  2. 依次单击运行 > 启动调试 (或按 F5)。
  3. 然后选择以下调试配置之一:
    • AutoLISP Debug: Launch——启动 AutoCAD 应用程序的新实例以调试当前 LSP 文件。
    • AutoLISP Debug: Attach——将当前 LSP 文件附加到正在运行的 AutoCAD 应用程序实例以进行调试。如果出现提示,请指定 AutoCAD 可执行文件(Windows 上的 acad.exe 或 Mac 上的 AutoCAD)的绝对路径。

注意:为了避免每次单击运行 > 启动调试(或按 F5)时都指定此路径,此路径将由扩展自动保存。有关配置扩展的其他信息,请参见如何配置 AutoCAD 路径

如何配置 AutoCAD 路径

  1. 在 Visual Studio Code 中,依次单击文件 > 首选项 > 设置
  2. 在“用户”选项卡下,展开“扩展”,然后单击“AutoCAD® AutoLISP 配置“。
  3. 更新 Debug: Attach Process 以指定 Debug: Attach 可以附着的进程名称,以过滤无关进程。
  4. 更新 Debug: Launch Program 以指定要与 Debug: Launch 一起使用的 AutoCAD 可执行文件的路径。
  5. 更新 Debug: Launch Parameters 以指定 AutoCAD 启动参数。

注意:配置时请确保将以下示例中的启动程序路径(Launch Program)替换为实际的 AutoCAD 程序路径。

示例(Windows)

  • Launch Program:C:\Program Files\Autodesk\AutoCAD <release>\acad.exe
  • Attach Process:acad

示例(Mac OS)

  • Launch Program:/Applications/Autodesk/AutoCAD <release>/AutoCAD <release>.app/Contents/MacOS/AutoCAD
  • Attach Process:AutoCAD

更多信息请参阅联机文档

注意

  1. 其他 AutoLISP 扩展可能与此扩展冲突。如果无法在 LSP 文件中设置断点或无法使用启动/附着调试配置,则应禁用或卸载所有其他 AutoLISP 扩展。
  2. 在 Mac® OS 上使用此扩展时,扩展设置中的“Launch Program”应为“.../AutoCAD <release>.app/Contents/MacOS/AutoCAD”,而不是 AutoCAD <release>.app 的绝对路径。
  3. 对于 AutoCAD 专用工具集或基于 OEM 的产品,产品名称可能与 AutoCAD 或 acad.exe 不同。要将此扩展用于这些产品,请根据要调试的产品在扩展设置中设置对应“Launch Program”的值。
  4. 如果以管理员身份启动 AutoCAD,则同样应以管理员身份启动 Microsoft Visual Studio Code。否则,Microsoft Visual Studio Code 将无法找到用于附加调试的 AutoCAD 进程。

Legal

Visual Studio Code Extension for AutoCAD® AutoLISP © 2020 Autodesk, Inc. All rights reserved.

Privacy

To learn more about Autodesk’s online and offline privacy practices, please see the Autodesk Privacy Statement.

Trademarks

The license does not grant permission to use the trade names, trademarks, service marks, or product names of Autodesk, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of any notice file. Autodesk, the Autodesk logo, AutoCAD and AutoLISP are registered trademarks or trademarks of Autodesk, Inc., and/or its subsidiaries and/or affiliates in the USA and/or other countries. All other brand names, product names, or trademarks belong to their respective holders. Autodesk is not responsible for typographical or graphical errors that may appear in this document.

All other brand names, product names or trademarks belong to their respective holders.

Third-Party Trademarks, Software Credits and Attributions

See here.

autolispext's People

Contributors

adstchens avatar ambrosl-adsk avatar beretboat avatar dependabot[bot] avatar fangzhongyu9 avatar higurashi-kagome avatar hualin-wu-2000 avatar jd-howard avatar kevinaut avatar landong-adsk avatar nigma456 avatar qiuradsk avatar sen-real avatar shuang6 avatar szilvaa-adsk avatar tmo793 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autolispext's Issues

.Net Symbol Coloring

The original VLIDE would color function definitions created using .Net and I would like to see this ability get carried over to this Extension.

Describe the solution you'd like
Preferably to colorize all function names that exist in the global scope of the active AutoCAD document, but special ones defined by .Net or Arx would be especially helpful in a different color to identify stuff I can't do anything about from lisp.

Describe alternatives you've considered
Debugger currently sees these symbols as <EXRXSUBR> functions if you mouse over them. If it isn't that difficult to only colorize them while in debug mode that would be okay too. My own research into dynamic coloring hasn't gone very well, so I don't know how viable this is in general.

image

wrong typos in readme.md

Describe the bug
Maybe the word "Extensio" in Legal part of the readme.md should be "Extension".

To Reproduce
Steps to reproduce the behavior:
simply goto the Legal part in Readme.md, u should find the word.

Expected behavior
Extensio -> Extension

Screenshots
image

Desktop (please complete the following information):

  • OS: OSX
  • Version 10.15.5

Additional context

different auto format between foreach and vlax-for

Currently the autoformating of foreach and vlax-for is creating the following result:
image
Something that is bothering me, is that the foreach and vlax-for look differently with auto format. With foreach first the iteration symbol and then the list through which is iterated are all put in one line. This is also the same syntax you see in many other languages (eg. vba, c# etc.). With vlax-for the collection is put on a separate line.
This makes it a bit harder to understand what is going on in my opinion.

I would prefer if autoformating would have this result:
image

Go to definition not active in Go menu.

Describe the bug
Go to definition (F12) is available from the Editor context menu but the very same option is disabled in the Go menu.

To Reproduce
Click on the Go menu. The option is grayed out. Right click and the option is available.
Expected behavior
Should be active in both menus.

Include AutoLISP Project Manager in the View menu.

Is your feature request related to a problem? Please describe.
More an aesthetic issue.
Describe the solution you'd like
The View menu includes options to Show/Hide the Explorer, Search, SCM , Run and Extensions icons in the Activity Bar. Why doesn't it include the same for the AutoLISP Project Manager?

Allow non-AutoLisp files in the project list.

Is your feature request related to a problem? Please describe.
I work with more than just AutoLisp files for my project. I use text files and .dat files but these are not permitted in the project list.

Describe the solution you'd like

  1. Allow the addition of any file in the project list.
  2. provide a setting that provides a list of extensions to never add to the file list (e.g. .EXE files or .DLL files, etc.

Describe alternatives you've considered
none

Additional context
none

Please consider to move off deprecated VS Code APIs

Hi, I'm @weinand from the VS Code team.

While investigating which debugger extensions are using deprecated extension API I found an issue with your extension (for details see microsoft/vscode#88849).

In the package.json the deprecated contribution point "debuggers.adapterExecutableCommand" is used.

Please use the "vscode.DebugAdapterDescriptorFactory" and a "vscode.DebugAdapterExecutable" instead like shown here with Mock debug.

You can register the adapter factory in the extensions "activate" function like this:

context.subscriptions.push(vscode.debug.registerDebugAdapterDescriptorFactory(DEBUG_TYPE, factory));

PRV & VLX Support - Feature Request

Is your feature request related to a problem? Please describe.
The current (vlisp-compile) function refuses to produce a *.VLX and doesn't appear to work with *.PRV files. We don't have anything directly in the AutoLispExt for working with either of these file formats either. I am not a wizard with the *.PRJ file type, but one of the reasons I never gravitated to them was the inability to package multiple LSP's into a single output; or at least I never saw it while trying. We have a bunch (13) "Namespace" like LSP's who's prefixes represent their expected return types (like STR/XYZ) or core purposes (like SYSVAR) that we want to continue compiling into a single VLX.

Describe the solution you'd like
I consider FAS to be slightly less secure than VLX and thus don't currently use FAS at all in my workflows. So, I would prefer to have a way to compile to VLX, but functionally FAS is capable of representing multiple LSP files and that is my core requirement. However, I believe PRJ's miss the mark on this core requirement; correct me if I am wrong.

Describe alternatives you've considered
I currently have my own C# app for making/managing *.PRV files that puts a IP protection header LSP as the first file in every PRV it makes. It is a fairly simple program I could easily remove my own personal workflows from if we wanted to make it available. However, this wouldn't give us a cross platform capabilities without a .Net Core dependency... I know VSCode is Electron based, but I don't know if the act of having VSCode installed is sufficient for users to "run" Electron apps. Does it handle that dependency for us? It would be somewhat trivial to reproduce something like the VLIDE "New Application Wizard" using Electron if it does, but I certainly wouldn't want to impose a 100MB dependency to our users.

Additional context
I don't really want to add a bunch of keywords to search engines on why I prefer VLX over FAS or how my IP header works. So, if you want to have a deeper "security" discussion please reach out to me through email; Albert has it.

I want to be able to get code coverage by running some test automation

Our product is built with mainly lisp, apart from c++ and c#. Though we have code coverage result on other languages (c++ and c#), we do not have code coverage for lisp, hence we lack the overall code coverage overview. With this lisp code coverage, it will help us to keep track of our test automation coverage, and where it get covered, so that we can focus our manual test in other areas and adding more test in particular areas to improve our testing efficiency.

Update Project to TypeScript 3.7

Is your feature request related to a problem? Please describe.
We are missing a major bit of functionality (null chaining) that would clean up our logical expressions.

The following throws an error in TS when trying to transpile to JS:

if (vscode.window.activeTextEditor?.document)

Describe the solution you'd like
Update to TypeScript 3.7.0 or greater. This null chaining is native to JavaScript and TypeScript finally got around to supporting it. Our conditionals would really benefit (more concise) from this update.

Additional context
Here is the release notes about chaining.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html

I played around with doing this, but I think NodeJs (and maybe more) also needs to be updated in order to use 3.7

I want to close a project on project panel.

Is your feature request related to a problem? Please describe.
Close Project, this doesn’t seem to be possible in the current flow.

Describe the solution you'd like
VLIDE allowed the user to this, and feels like I should be able to close something if I opened it.
We should be able to do it on the project panel.

Describe alternatives you've considered
No.

Additional context
From: Lee Ambrosius

Contextual menu item to add file to project

I'm just getting started trying out the .prj feature, I never used VLIDE for the lisp system I manage so I had never ran across it before. There are hundreds of files in my lisp system and am trying to cherry pick specific files into subject related projects to try it out.

The first thing I attempted when trying to add specific files to the project was right-click on the file in the workspace explorer and look for an item "Add to Current AutoLISP Project", hoping it was there. Well, second thing, because the first thing was the "Add File to Project" button in the AutoLISP Project Manager area and added one manually that way. I realized how much of a pain it would be to do this for the next 50 or so files, so I immediately hoped that there would be a contextual menu option for me to add things easily to the project.

Remove blank line.

Is your feature request related to a problem? Please describe.
Please remove blank lines when formatting autolisp code.

Describe the solution you'd like
In the code formatting section, give the option to remove blank lines.

Provide better language syntax differentiation and highlighting

Is your feature request related to a problem? Please describe.
The color highlighting provided by the textmate syntax parser does not provide enough language differentiation and highlighting options

Describe the solution you'd like
Provide a better textmate syntax language parser

Describe alternatives you've considered
use the attached language syntax parser file I created.

Additional context
See the attached PDF for the language identifiers that can be used to highlight the language. Also, the attached settings.json correctly highlights the language.
Lastly, at the last minute, I adjusted the language file to allow parentheses to be highlighted, on a per depth basis, to 6 levels.
Language Syntax.zip

Question: AutoLispDebugAdapter not found

Hey, I'm getting error below. I can't find any information online, how to fix it. My autocad path and process are set correctly.

I'm using version Autocad 2020. How do I know which versions supports this adapter?

AutoLispDebugAdapter.exe doesn’t exist. Verify that the file exists in the same folder as that for the product specified in the launch.json file.

Feature request: Option to display all global variables in a list

Is your feature request related to a problem? Please describe.
I'm always frustrated when I find a bug related to me forgetting to me forgetting to make a variable private to a function and then it causes a problem in my program.

Describe the solution you'd like
I'd like a reminder when I defun a new function that shows me all my global variables, with an easy option to change any to being private to the function they're declared in.

Describe alternatives you've considered
It could also just be a list of your global variables that pops up on request. If that's the case, I'd like to have the function the variable is first used in shown next to the variable name.

It could also ask when you make a new variable with setq if you want to make it private in the function definition line.

I want to be able to configure the help link

Is your feature request related to a problem? Please describe.
when I click Open Online Help, I want to be directed to the help page with same version as my AutoCAD's.

Describe the solution you'd like
I want to be able to configure the online help link so that I can change as needed.

Can't reload modified file in debug session

Describe the bug

(Open a Workspace)

  • Open a LISP-Sourcefile
  • Start Debugging (Launch a new instance of AutoCAD 2021)
  • Edit the LISP file (to fix an error….)
  • Try to reload the LISP
  • Message in Debug Console:
    "File can't be reloaded because it was modified after being loaded"
  • Debug Session must be restarted!

Expected behavior
IMHO, as an absolutely common practise while debugging, reloading a modified file should be possible.
At least when the currently executed command/function has been termiated.

I want to rename a project easily.

Is your feature request related to a problem? Please describe.
Rename Project, this doesn’t seem to be possible in the current flow.

Describe the solution you'd like
I want to rename a project easily.

Describe alternatives you've considered
No.

Additional context
From: Lee Ambrosius

Auto formatting

Need to be able to auto format a lsp file with right indentation, so that we can easily collapse code section for better readability

Want to create a new file from the AutoLISP Project Manager

Is your feature request related to a problem? Please describe.
We can't create a new file which is automatically added into current project on the project panel

Describe the solution you'd like
It would be nice if there was an option to create a new file from the AutoLISP Project Manager and have it added to the project automatically. Projects in VL IDE were kind of a secondary thing.

Describe alternatives you've considered
No.

Additional context
From: Lee Ambrosius

Document Manager Enhancement Discussion

Is your feature request related to a problem? Please describe.
Many of the intelligence features I want in the AutoLispExt require foraging for information across PRJ, Workspace and even on fragments of LSP files. I've already started submitting PR's to help with that, but this is where I want to do some preliminary discussion on how it will be organized and what it will provide.

Describe the solution you'd like
This will most likely be a class so that getters can be used to dynamically serve the best available content. This will likely be a single pre-initialized instance called DocumentManager and that document manager will probably be the only export. The constructor of the document manager is intended to create and manage all the event hooks such as:

  • vscode.workspace.onDidOpenTextDocument
  • vscode.workspace.onDidCloseTextDocument
  • vscode.workspace.onDidRenameFiles
  • vscode.workspace.onDidChangeWorkspaceFolders (has to reset the FileSystemWatcher events)
  • vscode.FileSystemWatcher.onDidDelete
  • vscode.FileSystemWatcher.onDidCreate
  • vscode.FileSystemWatcher.onDidChange (not real sure this one will be necessary)

Note: The recent PR to natively add ReadonlyDocument's to the LspFileNode make it so that the PRJ events do not need to inform the DocumentManager about anything that happened in that space.

Another thing this will do is scan the workspace and find all the LSP files creating ReadonlyDocuments for each of them that get stored in a Map using their fspath as the key; this is to support multiple files with the same name. This global repo will take 3rd precedence for the content delivery system. Second precedence will be given to the PRJ referenced files and top priority will be given to opened documents; when aware of them that is. Still have a technical debt to figure out which files were already opened in the workspace reload when VSCode opened. However, once any of those file tabs get activated the above events will let us know and they will begin taking top priority.

There is performance concerns about reading the contents of all these files when our extension is first loading. It does not lock the interface, but it does in fact cause a scanning bar to show and some features aren't 100% available until it completes. It doesn't take long at all, even with 10mb of LSP files in your workspace, but a bit unsightly. Because of this, I am wondering if we should make a way to create a ReadonlyDocument without the actual (content) initialize that could demand load when the user is actually doing something that tries to use that data. Another option is to create the DM Map entries with null and let the document manager demand load them when requested.

Additional context
The expected common access point for this will be through the ContextManager.Documents getter.

Load multiple files at the same time.

Is your feature request related to a problem? Please describe.
Please allow multiple files to be loaded at the same time.

Describe the solution you'd like
Next to the Load Lisp button, on the bottom bar.
Create a button that allows you to load all open files.

Unable to see current values when exception occurs

Is your feature request related to a problem? Please describe.
image
when a Exception occurs while debugging. The current values are no longer visible.

Describe the solution you'd like
When an exception occurs keep displaying the current value of variables when a exception occurs. Similar to other debuggers like C#.

Wrong description in snippet.

Describe the bug
The description for the NTH snippet is wrong.
Expected behavior
The current description is "Evaluates each expression a specified number of times, and returns the value of the last expression" but it should be "Returns the nth element of a list".

Run without debugging (Ctrl+F5)

Describe the bug
Run without debugging (Ctrl+F5) It doesn't work for me in AutoLISP.

To Reproduce
When trying to Run without debugging, the application still runs.

Desktop (please complete the following information):

  • OS: Window
  • Version 10

Additional context
This is a mistake?
Or am I doing something wrong?

Project disappears when activatin the Source Control Management view.

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Project Palette having visual tree issues

Describe the bug
PRJ treeview is not updating except while adding new *.lsp files.

To Reproduce
Steps to reproduce the behavior:

  1. Open ANY *.prj with valid file pointers
  2. no items will display, but everything else is generally correct (does contains data)
  3. hit refresh, no items show up
  4. add a new *.lsp file reference and they all magically appear

Desktop (please complete the following information):

  • OS: Win10

Additional context
I am relatively certain this has to do with the PR #42 changes that turned all the onChange.fire() events into a problem. The only other recent thing that could have potentially caused this was PR #36 but I've re-checked all the code from that and I don't see any issues. Anybody have some ideas on why this is inconsistently working?

Add "Select a folder" to add files to a project

Is your feature request related to a problem? Please describe.
Not a problem - just makes things easier.

Describe the solution you'd like
All the selection of a folder and have the system select all of the files in the folder automatically.

Describe alternatives you've considered
none

Additional context
none

Cannot open project file

Describe the bug
Open an existing project fails with the message that the project file is malformed.

To Reproduce
Steps to reproduce the behavior:

  1. create a project
  2. add files to project
  3. close project (open something else)
  4. goto AutoLisp project sidebar
  5. chose open existng project
  6. select the project just made above
  7. project does not open and dialog box is displayed that reads "failed to open the specified project. Error: Malformed project file ..."

Expected behavior
Project file is opened and project list is updated

Screenshots
none

Desktop (please complete the following information):

  • OS: windows
  • Version 10.0.10941

Additional context
none

Conditional Breakpoints - Feature Request

Is your feature request related to a problem? Please describe.
VSCode is reporting that conditional breakpoints are not currently supported by the debugger. The below image is the message you get when the mouse is over one you've defined.
image

Describe the solution you'd like
Ability to use some kind of condition. I don't care if I have to write it in Lisp, JavaScript, Python or whatever else is the path of least resistance.

Additional Notes
This would be especially useful when dealing with long lists. It would be a an extremely large help to setup a test for nil or an exact string value.

Edit clearly didn't proofread that.

Use a tree structure in the project list

Is your feature request related to a problem? Please describe.
Project list gets hard to work with when there are too many files

Describe the solution you'd like

  1. Present the files in the project list based on the folder structure
  2. if possible, allow the imposition of a folder structure onto the file list.

Describe alternatives you've considered
none

Additional context
none

Format Selection does not respect the usage of tabs versus spaces

Describe the bug
I prefer to use tabs over spaces in my code. When I select a portion of code and chose "format" selection, the tabs are removed and spaces are used.

To Reproduce
Steps to reproduce the behavior:

  1. select a code section.
  2. right click and chose "format selection"
  3. code section is formatted but the indent tabs are replaced with spaces.

Expected behavior
Respect the tabs versus spaces setting.

Screenshots
none

Desktop (please complete the following information):

  • OS: Windows
  • Version: 10.0.1904

Additional context
none

Comment Driven Behaviors

Is your feature request related to a problem? Please describe.
Lisp is generally quite dumb and I would like to solve that with comment annotations.

Describe the solution you'd like
This would exist purely to enhance the overall intelligence that VSCode can give users. I would like to use a formalized comment system to provide:

  • LSP file header reference(s) to another *.LSP that explicitly instructs VSCode to include those (now linked) document symbols in my autoComplete suggestions. Very similar to how TypeScript & C# uses the Import keyword to create a direct data coupling to an external file.
  • SETQ headers that denote VSCode should refer to these variable names as enumerators.
  • DEFUN headers that can provide signature and argument declaration information for user defined functions.

Additional context
None of this is unique and the benefits would be quite the feature evolution for AutoLisp users. Many languages provide Attribute headers and ///@param comment declarations. We would just need to formalize what we are doing and nudge VSCode to help the user follow those rules. I would probably suggest not going C# & XML on this. Thinking more like something resembling AutoLisp:

;(assert IMPORT "./utilities/pointHelpers.lsp")


;(assert ENUM (type STR) "optional usage description")
(setq goodChoice "UseExisting"
      badChoice  "StartFromScratch"
)


;(assert DEFUN (pt1 (type LIST)) (pt2 (type LIST)) (type LIST))
ALSO accept longer/cleaner versions of the header like:
;(assert DEFUN "optional usage statement"
;    (pt1 (type LIST) "optional definition statement")
;    (pt2 (type LIST) "optional definition statement")
;    (type LIST "optional return value summary statement"))
(defun XYZ:Midpoint (pt1 pt2 / x y z) 
  (setq x (/ (+ (car pt2) (car pt1)) 2.0)
        y (/ (+ (cadr pt2) (cadr pt1)) 2.0)
        z (/ (+ (caddr pt2) (caddr pt1)) 2.0)
  )
  (list x y z)
)

So, these examples represent a suggestion to rely on the syntax we already have. This will allow us to utilize existing parsing capabilities to extract this information. We would just have to define some comment system function/type names

Intelli Sense for functions

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
#15

Describe the solution you'd like
Show in which part of the function I am and give hints what parameters are appropriate at this place.
Similar to how Excel shows what Parameter in what function is currently being edited
image

Example for signature in vscode C#
image

It should identify the global and local variables in vscode by the lisp extension

Is your feature request related to a problem? Please describe.
From Christopher Cowgill's feedback in the beta forum:

Vscode will show all locals, but not global variable values. I really could use this, as well as a way to see what variables are global and local, similar to in VLIDE when you can list statistics and see the global variables in a function. I use it to make sure that my variables are local when they need to be.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

yarn install - No Access to "art-bobcat.autodesk.com"

Describe the bug
I was going to download this and tinker with this a bit and apparently can't because the art-bobcat.autodesk.com domain is gone or down. Here is the output from my attempt to run yarn install

PS Z:\AutoLispExt> yarn install
yarn install v1.22.5
[1/5] Validating package.json...
warning [email protected]: The engine "vscode" appears to be invalid.
[2/5] Resolving packages...
[3/5] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://art-bobcat.autodesk.com:443/artifactory/api/npm/team-autocad-npm-virtual/cross-spawn/-/cross-spawn-5.1.0.tgz: getaddrinfo ENOTFOUND art-bobcat.autodesk.com".
info If you think this is a bug, please open a bug report with the information provided in "Z:\AutoLispExt\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
A clear and concise description of what the bug is.

Desktop (please complete the following information):
Windows10

Other
I previously had NPM v6.14.4 & NODE v12.18.0 installed.
If you want my log file I can get it to you, but it seems pretty clear whats going on here.

AutoLISP Project Manager or Workspace?

The AutoLISP Project Manager introduced with 1.3.0 Introduces nothing new. What it does was already available using multi-root Workspaces. In fact managing Workspaces is more complete as they can be closed from the Files menu, something lacking in the Project Manager. In a Workspace you can include and manage DCL or other resource files, while in the project you can only include LSP files.
The Search feature in the Project Manager does the same as the Edit > Find in files menu option already in VS Code. I believe adding these useless stuff to the extension is confusing and will not help in attracting users to this new environment.

What is really needed is to add to MAKELISPAPP the things that were available in the VLISP Project window, such as:

  • The option to compile files to FAS instead of VLX if no DCL or other resources are needed.
  • Choosing compiler options such as the Internal link mode, so the compiler tries to resolve all explicit function calls by referencing the function's definition in memory.
  • Selecting Localize variables, so the compiler would also remove all local symbol names.
  • Selecting Safe optimize.
  • Selecting Full reports as the Message Mode so we have all the information about the compilation process including errors, warnings and compiler statistics.

A desirable feature would also be to simultaneously load all the files in our Workspace (or Project, if you prefer to call it that way) for debugging.

Provide a setting about how deep to indent code

Is your feature request related to a problem? Please describe.
Not exactly a problem - just a preference. When the code is formatted, code lines are on a different line but are indented to align with the beginning of the function that the following lines of code are associated with. I feel that subsequent code lines should be indented one extra tab depth from the prior line (even better would be setting that sent the number of tabs indented in from the prior code line. I personally find having code lines extra deeply indented hard to read - even though i understand the reason / basis.

Describe the solution you'd like
settings to control how subsequent code lines are indented (to align or not to align) and how many tabs indented and whether to not change the relative depth from whatever the user has indented.

Describe alternatives you've considered
No alternatives.

Additional context
This is similar to how visual studio + R# works.

Go To Defnitition inside if goes to wrong statement

Describe the bug
Go To Defnitition inside if jumps to wrong statement

Steps to reproduce the behavior:
Test with the following code:
(defun foo () (setq a 1) (if T (progn (setq a 2) (print a) ) ) )

  • set the cursor on a in (print a)
  • Press F12
  • cursor cumps to (setq a 1)

image

Expected behavior
Courser jumps to (setq a 2)

Search Path for go to definition

While testing out the great go to definition feature, I noticed, that it also seems to be searching through the .vscode folder in my workspace. Is there any way to change which locations are searched for the go to definition feature?
image

Check Text in vscode Editor with lisp extension

Is your feature request related to a problem? Please describe.
From Christopher Cowgill's feedback in the beta forum:

In VLIDE, you can check your text and it will tell you if there is something wrong, such as having too many arguments in an If statement. Is there anything like that for VSCODE?
Another thing that Check Text in Editor does that is useful is to show you what variables are global, so if you did not intend for it to be global, you can see your mistake and localize it

Describe the solution you'd like
the lisp extension should be able to check the text in vscode editor and mark the global variables.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

I want to access help for a standard AutoLISP function

In the context of editing a LSP file, I want to select a function name and then right-click and choose a command like Help from the right-click menu. This should open the latest version of the AutoLISP Reference documentation in a Web browser to the selected function's topic, if no text is selected it could just open Help to a general or Homepage page.

require command line compile tools

we need a command line compile tool to batch compile lsp to vlx.

in AutoCAD command line, makelispapp is not controlled by the sysvar "filedia". So we cannot use it to batch compile source file via script.

We need console compile tool to compile lsp to vlx/fas, run on cmd console, or powershell console, or autocad command line.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.