mirror of
https://github.com/nvim-lua/kickstart.nvim.git
synced 2025-06-22 21:33:30 +02:00
feat: latest preferences
This commit is contained in:
parent
9d965db75f
commit
1fd6b5e58b
9 changed files with 106 additions and 67 deletions
|
@ -5,7 +5,12 @@
|
|||
|
||||
return {
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = {
|
||||
'ray-x/go.nvim',
|
||||
'ray-x/guihua.lua',
|
||||
},
|
||||
config = function()
|
||||
require("go").setup()
|
||||
-- Switch for controlling whether you want autoformatting.
|
||||
-- Use :KickstartFormatToggle to toggle autoformatting on or off
|
||||
local format_is_enabled = true
|
||||
|
@ -60,12 +65,16 @@ return {
|
|||
return
|
||||
end
|
||||
|
||||
vim.lsp.buf.format {
|
||||
async = false,
|
||||
filter = function(c)
|
||||
return c.id == client.id
|
||||
end,
|
||||
}
|
||||
if vim.bo.filetype == 'go' then
|
||||
require('go.format').goimport()
|
||||
else
|
||||
vim.lsp.buf.format {
|
||||
async = false,
|
||||
filter = function(c)
|
||||
return c.id == client.id
|
||||
end,
|
||||
}
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue