-
Notifications
You must be signed in to change notification settings - Fork 2
Many fixes #1
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
Draft
iainlane
wants to merge
9
commits into
Duologic:master
Choose a base branch
from
iainlane:iainlane/fixes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Many fixes #1
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This makes formatting consistent across different users.
Add a `key_prefix` string, a `keys` table and a `setup_mappings` boolean to the options to allow key mappings to be customised or switched off. User-provided mappings are merged with defaults, which allows individual fields to be updated.
Just a small tidy up which removes some code from the setup function. Adding descriptions to the commands means that various things like `cmp` or `which-key` can pick them up and show them to the user.
The current setup is giving
```
Failed to run `config` for nvim-jsonnet
...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:387: module 'jsonnet' not found:
no field package.preload['jsonnet']
cache_loader: module 'jsonnet' not found
cache_loader_lib: module 'jsonnet' not found
no file './jsonnet.lua'
no file '/opt/homebrew/share/luajit-2.1/jsonnet.lua'
no file '/usr/local/share/lua/5.1/jsonnet.lua'
no file '/usr/local/share/lua/5.1/jsonnet/init.lua'
no file '/opt/homebrew/share/lua/5.1/jsonnet.lua'
no file '/opt/homebrew/share/lua/5.1/jsonnet/init.lua'
no file './jsonnet.so'
no file '/usr/local/lib/lua/5.1/jsonnet.so'
no file '/opt/homebrew/lib/lua/5.1/jsonnet.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
- ~/.config/nvim/lua/config/lazy.lua:30
- ~/.config/nvim/init.lua:1
```
when we try to load the plugin using `lazy.nvim`. This is because the
plugin name was `nvim-jsonnet` but we weren't under a `lua` directory
with that name. Moving the files to `lua/nvim-jsonnet` and providing an
`init.lua` file fixes this.
Instead of doing all of the work at initialisation time in the plugin's `setup` function, add a callback which will be invoked when we enter a Jsonnet buffer. To prevent it running multiple times, we set a flag `do_setup` and skip if it's already been run.
This means that we don't expose the `Jsonnet*` commands in other buffers, as they are not relevant there.
This is a user configuration option, not something a plugin should set.
This commit integrates the layout support from [`CopilotChat.nvim`][CopilotChat], which some modifications. There's a new `window` table in the configuration which allows the layout to be customised. The job/execution handling is updated a bit to align with this too. Now we keep a reference to a single buffer around, and track whether it's visible or hidden etc. [CopilotChat]: https://github.com/CopilotC-Nvim/CopilotChat.nvim
Just some trivial lint errors that prettier & markdownlint pick up
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See the individual commits and cherry-pick/update them as needed - PR is just for convenience.