-
Notifications
You must be signed in to change notification settings - Fork 41.1k
feat: move to lazy and fix many issues #178
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
c6629b4
begin refresh
tjdevries 4f11281
move leader to top of file
tjdevries 68a0332
tree-sitter updates
tjdevries 1afbeca
docs
tjdevries 69d7d4a
fix typo
tjdevries 4d218e3
add a few more todos for myself
tjdevries d6ad146
add example of autoformatting
tjdevries 36e99fb
note to self
tjdevries 1a2a96b
move to good format after talking to folke
tjdevries 0d7e4da
debug works much better now
tjdevries 5ba0db5
readme
tjdevries e40d704
more docs
tjdevries c33d911
more docs
tjdevries eea0adb
more docs
tjdevries a740052
more docs
tjdevries ba5786c
more docs
tjdevries 775ff6a
more docs
tjdevries e5c03b4
add whichkey
tjdevries bdbe2f3
getting to the closing part of this repo
tjdevries 33469ef
fix several of folke's comments
tjdevries d8784b6
opt -> opts, ty folke part 2
tjdevries File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 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 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,6 @@ | |
|
|
||
| return { | ||
| 'neovim/nvim-lspconfig', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: For myself, could add null-ls here since I know that's a big hang up for a lot of people There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. meh, i think i'll do this later if I want it |
||
|
|
||
| config = function() | ||
| -- Switch for controlling whether you want autoformatting. | ||
| -- Use :KickstartFormatToggle to toggle autoformatting on or off | ||
|
|
@@ -29,9 +28,11 @@ return { | |
| return _augroups[client.id] | ||
| end | ||
|
|
||
| -- Whenever an LSP attaches to a buffer, we will run this function. | ||
| -- | ||
| -- See `:help LspAttach` for more information about this autocmd event. | ||
| vim.api.nvim_create_autocmd('LspAttach', { | ||
| group = vim.api.nvim_create_augroup('kickstart-lsp-attach-format', { clear = true }), | ||
|
|
||
| -- This is where we attach the autoformatting for reasonable clients | ||
| callback = function(args) | ||
| local client_id = args.data.client_id | ||
|
|
@@ -49,6 +50,8 @@ return { | |
| return | ||
| end | ||
|
|
||
| -- Create an autocmd that will run *before* we save the buffer. | ||
| -- Run the formatting command for the LSP that has just attached. | ||
| vim.api.nvim_create_autocmd('BufWritePre', { | ||
| group = get_augroup(client), | ||
| buffer = bufnr, | ||
|
|
@@ -57,7 +60,12 @@ return { | |
| return | ||
| end | ||
|
|
||
| vim.lsp.buf.format { async = false } | ||
| vim.lsp.buf.format { | ||
| async = false, | ||
| filter = function(c) | ||
| return c.id == client.id | ||
| end, | ||
| } | ||
| end, | ||
| }) | ||
| end, | ||
|
|
||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be
opts. Same for a bunch of others below :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call haha