Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5875bfa
fix: use 1ch unsolved goal padding instead of 1em (#587)
mhuisi Mar 8, 2025
ad0a17f
Release 0.0.197 (pre-release)
mhuisi Mar 8, 2025
96d35bd
feat: add abbreviation `xs` for `×ˢ`, denoting the product set (#588)
jhanschoo Mar 11, 2025
681200b
feat: expose client-side language server logging in config (#589)
mhuisi Mar 11, 2025
1bbb32f
chore: bump unicode input versions and add publish action for unicode…
mhuisi Mar 11, 2025
e844f6a
Release 0.0.198 (pre-release)
mhuisi Mar 11, 2025
a58d976
feat: adjust edit delay and make it configurable (#593)
mhuisi Mar 19, 2025
bdc7471
feat: add `\tiny` and `\miny` for `⧾` and `⧿` (#591)
vihdzp Mar 19, 2025
36b777d
Release 0.0.199 (pre-release)
mhuisi Mar 19, 2025
4a53e11
feat: theme colors in 'unsolved goals' decoration (#595)
mhuisi Mar 26, 2025
917858c
Release 0.0.200 (pre-release)
mhuisi Mar 26, 2025
82a347b
Release 0.0.201
mhuisi Mar 27, 2025
de1093a
feat: add uri handler for the setup-guide (#596)
algebraic-dev Mar 29, 2025
a56f7ea
chore: rename the unused "8<" abbreviation as "scissor" to fix subscr…
euprunin Apr 7, 2025
389bb4d
test: make tests more stable (#601)
mhuisi Apr 8, 2025
4c7cbdd
chore: bump unicode input version (#600)
mhuisi Apr 8, 2025
ccbfe24
feat: improve decoration computation performance (#604)
mhuisi Apr 8, 2025
c1d143d
feat: errors for nested projects (#607)
mhuisi Apr 15, 2025
6504d3c
Release 0.0.202
mhuisi Apr 15, 2025
17ffa26
feat: make lean files in `.lake` and `.elan` read-only (#608)
mhuisi Apr 17, 2025
9cf599c
feat: error when opening project that contains lakefile but no lean-t…
mhuisi Apr 17, 2025
ba0d7e4
Release 0.0.203
mhuisi Apr 17, 2025
0d094aa
feat: sorted installed toolchains (#611)
mhuisi Apr 18, 2025
d310b9c
feat: improve activation error when forked extension is installed (#613)
mhuisi Apr 23, 2025
8e34c2e
feat: revamp infoview options and actions (#606)
mhuisi Apr 23, 2025
44bf3e6
Release 0.0.204
mhuisi Apr 23, 2025
8c426b6
adjust for lean4monaco
abentkamp Apr 26, 2025
aca0e14
fix: don't display popups during mouse selection (#615)
mhuisi Apr 30, 2025
5a938ad
Release 0.0.205
mhuisi Apr 30, 2025
59d6669
fix: workaround for invalid lake version in v4.21.0-rc1 (#618)
mhuisi Jun 3, 2025
6421d7c
Release 0.0.206
mhuisi Jun 3, 2025
50d57f2
feat: improve server startup progress bar message (#619)
mhuisi Jun 4, 2025
32297b5
Release 0.0.207
mhuisi Jun 4, 2025
4d91d09
Merge remote-tracking branch 'upstream/master' into update
abentkamp Jun 5, 2025
b8085c8
quick fix for windows path issue
abentkamp Jun 16, 2025
5cacfbd
fix windows file path issue
abentkamp Jun 17, 2025
c15d1c9
fix error
abentkamp Jun 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ jobs:
run: |
npm publish --workspace=lean4-infoview --access=public

- name: Try publishing unicode-input
if: ${{ startsWith(github.ref, 'refs/tags/v') && !endsWith(github.ref, '-pre') && matrix.os == 'ubuntu-latest' }}
continue-on-error: true
run: |
npm publish --workspace=lean4-unicode-input --access=public

- name: Try publishing unicode-input-component
if: ${{ startsWith(github.ref, 'refs/tags/v') && !endsWith(github.ref, '-pre') && matrix.os == 'ubuntu-latest' }}
continue-on-error: true
run: |
npm publish --workspace=lean4-unicode-input-component --access=public

- name: Package
run: npm run package --workspace=lean4
if: ${{ !startsWith(github.ref, 'refs/tags/v') || !endsWith(github.ref, '-pre') }}
Expand Down
2 changes: 1 addition & 1 deletion lean4-infoview-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@leanprover/infoview-api",
"version": "0.6.0",
"version": "0.7.0",
"description": "Types and API for @leanprover/infoview.",
"scripts": {
"watch": "tsc --watch",
Expand Down
66 changes: 53 additions & 13 deletions lean4-infoview-api/src/infoviewApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ import type {
WorkspaceEdit,
} from 'vscode-languageserver-protocol'

export type ExpectedTypeVisibility = 'Expanded by default' | 'Collapsed by default' | 'Hidden'

export interface InfoviewConfig {
allErrorsOnLine: boolean
autoOpenShowsGoal: boolean
debounceTime: number
expectedTypeVisibility: ExpectedTypeVisibility
showGoalNames: boolean
emphasizeFirstGoal: boolean
reverseTacticState: boolean
hideTypeAssumptions: boolean
hideInstanceAssumptions: boolean
hideInaccessibleAssumptions: boolean
hideLetValues: boolean
showTooltipOnHover: boolean
}

/**
* An insert `here` should be written exactly at the specified position,
* while one `above` should go on the preceding line.
Expand All @@ -15,6 +32,8 @@ export type TextInsertKind = 'here' | 'above'

/** Interface that the InfoView WebView uses to talk to the hosting editor. */
export interface EditorApi {
saveConfig(config: InfoviewConfig): Promise<any>

/** Make a request to the LSP server. */
sendClientRequest(uri: string, method: string, params: any): Promise<any>
/** Send a notification to the LSP server. */
Expand Down Expand Up @@ -77,25 +96,18 @@ export interface InfoviewTacticStateFilter {
flags: string
}

export interface InfoviewConfig {
allErrorsOnLine: boolean
autoOpenShowsGoal: boolean
debounceTime: number
showExpectedType: boolean
showGoalNames: boolean
emphasizeFirstGoal: boolean
reverseTacticState: boolean
showTooltipOnHover: boolean
}

export const defaultInfoviewConfig: InfoviewConfig = {
allErrorsOnLine: true,
autoOpenShowsGoal: true,
debounceTime: 50,
showExpectedType: true,
expectedTypeVisibility: 'Expanded by default',
showGoalNames: true,
emphasizeFirstGoal: false,
reverseTacticState: false,
hideTypeAssumptions: false,
hideInstanceAssumptions: false,
hideInaccessibleAssumptions: false,
hideLetValues: false,
showTooltipOnHover: true,
}

Expand All @@ -108,7 +120,35 @@ export type InfoviewActionKind =

export type InfoviewAction = { kind: InfoviewActionKind }

export type ContextMenuEntry = 'goToDefinition' | 'select' | 'unselect' | 'unselectAll'
export type ContextMenuEntry =
| 'goToDefinition'
| 'select'
| 'unselect'
| 'unselectAll'
| 'pause'
| 'unpause'
| 'pin'
| 'unpin'
| 'refresh'
| 'pauseAllMessages'
| 'unpauseAllMessages'
| 'goToPinnedLocation'
| 'goToMessageLocation'
| 'displayTargetBeforeAssumptions'
| 'displayAssumptionsBeforeTarget'
| 'hideTypeAssumptions'
| 'showTypeAssumptions'
| 'hideInstanceAssumptions'
| 'showInstanceAssumptions'
| 'hideInaccessibleAssumptions'
| 'showInaccessibleAssumptions'
| 'hideLetValues'
| 'showLetValues'
| 'hideGoalNames'
| 'showGoalNames'
| 'emphasizeFirstGoal'
| 'deemphasizeFirstGoal'
| 'saveSettings'

export interface ContextMenuAction {
entry: ContextMenuEntry
Expand Down
4 changes: 2 additions & 2 deletions lean4-infoview/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@leanprover/infoview",
"version": "0.8.3",
"version": "0.8.5",
"description": "An interactive display for the Lean 4 theorem prover.",
"scripts": {
"watch": "rollup --config --environment NODE_ENV:development --watch",
Expand Down Expand Up @@ -49,7 +49,7 @@
"typescript": "^5.4.5"
},
"dependencies": {
"@leanprover/infoview-api": "~0.6.0",
"@leanprover/infoview-api": "~0.7.0",
"@vscode/codicons": "^0.0.32",
"@vscode-elements/react-elements": "^0.5.0",
"es-module-lexer": "^1.5.4",
Expand Down
11 changes: 8 additions & 3 deletions lean4-infoview/src/infoview/collapsing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,24 @@ export function useIsVisible(): [(element: HTMLElement) => void, boolean] {
return [node, isVisible]
}

interface DetailsProps {
interface DetailsProps extends React.PropsWithoutRef<React.HTMLProps<HTMLDetailsElement>> {
initiallyOpen?: boolean
children: [React.ReactNode, ...React.ReactNode[]]
setOpenRef?: (_: React.Dispatch<React.SetStateAction<boolean>>) => void
}

/** Like `<details>` but can be programatically revealed using `setOpenRef`.
* The first child is placed inside the `<summary>` node. */
export function Details({ initiallyOpen, children: [summary, ...children], setOpenRef }: DetailsProps): JSX.Element {
export function Details({
initiallyOpen,
children: [summary, ...children],
setOpenRef,
...props
}: DetailsProps): JSX.Element {
const [isOpen, setOpen] = React.useState<boolean>(initiallyOpen === undefined ? false : initiallyOpen)
if (setOpenRef) setOpenRef(setOpen)
return (
<details open={isOpen}>
<details open={isOpen} {...props}>
<summary
className="mv2 pointer "
onClick={e => {
Expand Down
Loading
Loading