-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
I run into this often in dual hardhat/foundry repos, and usually just delete the hardhat.config.ts file while working, since many of the LSP features I rely on break because the hardhat plugin defaults to loading the hardhat config with no way to configure which it prefers.
This is true even when the project uses HardHat 2 - possibly related to #709
Repro steps:
npx create-lz-oapp@latest --example oapp- Open
MyOapp.sol - Delete
hardhat.config.tsor rename tohardhat.config.ts.bak - Restart extensions so the HardHat plugin loads the
foundry.tomlconfig instead of the HardHat config:> Developer: Restart Extension Host
I only have the HardHat extension installed for Solidity files:
cursor --list-extensions
adpyke.codesnap
anysphere.cursorpyright
anysphere.remote-containers
asvetliakov.vscode-neovim
bierner.markdown-mermaid
biomejs.biome
bradlc.vscode-tailwindcss
charliermarsh.ruff
connorshea.vscode-ruby-test-adapter
eamodio.gitlens
esbenp.prettier-vscode
github.vscode-github-actions
github.vscode-pull-request-github
golang.go
hbenl.vscode-test-explorer
jdinhlife.gruvbox
jeff-hykin.better-nix-syntax
jock.svg
ms-azuretools.vscode-containers
ms-azuretools.vscode-docker
ms-python.debugpy
ms-python.python
ms-python.vscode-pylance
ms-toolsai.jupyter
ms-toolsai.jupyter-renderers
ms-toolsai.vscode-jupyter-cell-tags
ms-toolsai.vscode-jupyter-slideshow
ms-vscode.hexeditor
ms-vscode.live-server
ms-vscode.test-adapter-converter
ms-vscode.vscode-github-issue-notebooks
nomicfoundation.hardhat-solidity
nrwl.angular-console
pest.pest-ide-tools
redhat.java
redhat.vscode-yaml
rust-lang.rust-analyzer
ryanluker.vscode-coverage-gutters
ryuta46.multi-command
sainnhe.gruvbox-material
shopify.ruby-lsp
sorbet.sorbet-vscode-extension
tamasfe.even-better-toml
tintinweb.graphviz-interactive-preview
tomoki1207.pdf
vadimcn.vscode-lldb
vscjava.vscode-gradle
vscjava.vscode-java-debug
vscjava.vscode-java-dependency
vscjava.vscode-java-pack
vscjava.vscode-java-test
vscjava.vscode-maven
vscodevim.vim
yoavbls.pretty-ts-errors
yzhang.markdown-all-in-one
I understand why the HardHat Solidity extension would default to HardHat over Foundry when both are present - but I'd love the option to toggle between preferring one or the other. Even if this were fixed, I always default to Foundry-first config, and yours is the best LSP available by a wide margin 😅



