Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display evaluation results #15

Merged
merged 19 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
7f85b72
feat(results): Display evaluation results.
Klafyvel Aug 7, 2024
cca15eb
refactor(protocol): Refactor the protocol client to use async feature…
Klafyvel Aug 14, 2024
cc4e6dd
refactor(ui): Created a dedicated module for managing the ui.
Klafyvel Aug 15, 2024
f02c41d
feat(ui): Highlight evaluated chunks in buffers.
Klafyvel Aug 17, 2024
df22aaf
refactor(diagnostics): Moved diagnostics display to the new system.
Klafyvel Aug 17, 2024
8e34332
refactor(protocol): Moved buffer handling out of protocol.
Klafyvel Aug 17, 2024
bd458cd
chore(buffers): Cleanup old buffer fields.
Klafyvel Aug 17, 2024
a869907
feat(ui): Added configuration options for display of results.
Klafyvel Aug 17, 2024
0741e5a
refactor(buffers): Use nvim api to detect invalidated code chunks.
Klafyvel Aug 17, 2024
1cd54ca
fix(buffers): Detect chunks invalidation consistently.
Klafyvel Aug 18, 2024
f91987d
feat(buffers): Delete invalidated chunks and results when evaluating …
Klafyvel Aug 18, 2024
37b7d42
fix(reslime): set column position correctly for smuggling visual lines.
Klafyvel Aug 18, 2024
9e49b38
feat(images): Display image results if image.nvim is present!
Klafyvel Aug 25, 2024
8afc63c
fix(ui): nil-guard results display.
Klafyvel Aug 31, 2024
50ae13f
refactor(config): Spearate logging, configuration, and application st…
Klafyvel Aug 31, 2024
fb8a6a2
feat(config): Add a configuration option to not show evaluation resul…
Klafyvel Aug 31, 2024
32009b1
feat(config): Added a configuration option for images sizes.
Klafyvel Aug 31, 2024
c07fe8a
feat(config): Implement Julia's IOContext buffer settings.
Klafyvel Aug 31, 2024
cef2b4e
fix(client): Smarter client to handle partial or overlapping server r…
Klafyvel Sep 8, 2024
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
37 changes: 31 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,37 @@ its sole argument. The options are the following (given with their default
values):
```lua
{
mappings = true, -- set to false to disable all mappings.
map_smuggle = "<leader>cs", -- Mapping for Smuggle in normal mode.
map_smuggle_range = "<leader>cs", -- For SmuggleRange in visual mode.
map_smuggle_config = "<leader>ce", -- SmuggleConfig in normal mode.
map_smuggle_operator = "gcs", -- SmuggleOperator in normal mode.
eval_by_blocks = false, -- Configure each new session eval by block attribute.
ui = {
mappings = { -- set to false to disable all mappings.
smuggle = "<leader>cs", -- Mapping for Smuggle in normal mode.
smuggle_range = "<leader>cs", -- For SmuggleRange in visual mode.
smuggle_config = "<leader>ce", -- SmuggleConfig in normal mode.
smuggle_operator = "gcs", -- SmuggleOperator in normal mode.
},
evaluated_hl = "MoreMsg", -- highlight group for evaluated chunks.
invalidated_hl = "WarningMsg", -- highlight group for invalidated evaluated chunks.
result_line_length = 80, -- line length of displayed results.
result_hl_group = "DiagnosticVirtualTextInfo", -- highlight group used for results.
display_results = true, -- Display evaluation results.
display_images = true, -- Display images if `images.nvim` is present.
images_height = 10, -- Number of lines an image should occupy.
},
log = {
level = "warn", -- available: trace, debug, info, warn, error, fatal
use_file = false, -- output logs to `stdpath("data")/smuggler.log`, e.g. `~/.local/share/nvim/smuggler.log `
use_console = true, -- output logs to the console.
},
buffers = {
eval_by_blocks = false, -- Configure each new session eval by block attribute.
showdir = vim.fs.dirname(vim.fn.tempname()),
iocontext = { -- Julia's IOContext
-- (https://docs.julialang.org/en/v1/base/io-network/#Base.IOContext-Tuple%7BIO,%20Pair%7D)
-- options to use.
compact = true,
limit = true,
displaysize = {10, 80},
},
},
}
```

Expand Down
70 changes: 54 additions & 16 deletions doc/smuggler.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,29 @@ also set the |quickfix| list and open the quickfix window.
:SmuggleShowDiagnostics
Show smuggler's diagnostics.

*:SmuggleResetDiagnostics*
:SmuggleResetDiagnostics
Reset smuggler's diagnostics.
*:SmuggleHideLocList*
:SmuggleHideLocList
Hide smuggler's diagnostics loclist.

*:SmuggleLocList*
:SmuggleLocList
Show smuggler's diagnostics loclist.

*:SmuggleHideEvaluated*
:SmuggleHideEvaluated
Hide highlight around evaluated chunks.

*:SmuggleShowEvaluated*
:SmuggleShowEvaluated
Show highlight around evaluated chunks.

*:SmuggleHideResults*
:SmuggleHideResults
Hide evaluation results.

*:SmuggleShowResults*
:SmuggleShowResults
Show evaluation results.

==============================================================================
LUA API *smuggler-lua-api*
Expand All @@ -90,13 +110,6 @@ The commands listed in |smuggler-usage| call the following lua functions.
*smuggler-lua-send-range*
send_range(l1, l2) Send the lines `l1` to `l2`, inclusive and 1-indexed.

*smuggler-lua-bufconfig*
bufconfig(bufnbr, force)
Configure the buffer `bufnbr`. If `force` is set to
`true`, any existing configuration is overwritten. If
a connection was active it is also closed. Will start
a new connection if needed.

*smuggler-lua-interrupt*
interrupt() Interrupt the current command.

Expand Down Expand Up @@ -155,12 +168,37 @@ The plugin is initialized through its `setup` function, which takes a table as
its sole argument. The options are the following (given with their default
values): >
{
mappings = true, -- set to false to disable all mappings.
map_smuggle = "<leader>cs", -- Mapping for Smuggle in normal mode.
map_smuggle_range = "<leader>cs", -- For SmuggleRange in visual mode.
map_smuggle_config = "<leader>ce", -- SmuggleConfig in normal mode.
map_smuggle_operator = "gcs", -- SmuggleOperator in normal mode.
eval_by_blocks = false, -- Configure each new session eval by block attribute.
ui = {
mappings = { -- set to false to disable all mappings.
smuggle = "<leader>cs", -- Mapping for Smuggle in normal mode.
smuggle_range = "<leader>cs", -- For SmuggleRange in visual mode.
smuggle_config = "<leader>ce", -- SmuggleConfig in normal mode.
smuggle_operator = "gcs", -- SmuggleOperator in normal mode.
},
evaluated_hl = "MoreMsg", -- highlight group for evaluated chunks.
invalidated_hl = "WarningMsg", -- highlight group for invalidated evaluated chunks.
result_line_length = 80, -- line length of displayed results.
result_hl_group = "DiagnosticVirtualTextInfo", -- highlight group used for results.
display_results = true, -- Display evaluation results.
display_images = true, -- Display images if `images.nvim` is present.
images_height = 10, -- Number of lines an image should occupy.
},
log = {
level = "warn", -- available: trace, debug, info, warn, error, fatal
use_file = false, -- output logs to `stdpath("data")/smuggler.log`, e.g. `~/.local/share/nvim/smuggler.log `
use_console = true, -- output logs to the console.
},
buffers = {
eval_by_blocks = false, -- Configure each new session eval by block attribute.
showdir = vim.fs.dirname(vim.fn.tempname()),
iocontext = { -- Julia's IOContext
-- (https://docs.julialang.org/en/v1/base/io-network/#Base.IOContext-Tuple%7BIO,%20Pair%7D)
-- options to use.
compact = true,
limit = true,
displaysize = {10, 80},
},
},
}
<
If you use the `rocks.nvim` package manager, you can use the
Expand Down
109 changes: 0 additions & 109 deletions lua/smuggler.lua

This file was deleted.

Loading
Loading