start
This commit is contained in:
parent
d350db2449
commit
a29c186b8a
47
init.lua
47
init.lua
|
@ -728,47 +728,6 @@ require('lazy').setup({
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ -- Autoformat
|
|
||||||
'stevearc/conform.nvim',
|
|
||||||
event = { 'BufWritePre' },
|
|
||||||
cmd = { 'ConformInfo' },
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
'<leader>f',
|
|
||||||
function()
|
|
||||||
require('conform').format { async = true, lsp_format = 'fallback' }
|
|
||||||
end,
|
|
||||||
mode = '',
|
|
||||||
desc = '[F]ormat buffer',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
notify_on_error = false,
|
|
||||||
format_on_save = function(bufnr)
|
|
||||||
-- Disable "format_on_save lsp_fallback" for languages that don't
|
|
||||||
-- have a well standardized coding style. You can add additional
|
|
||||||
-- languages here or re-enable it for the disabled ones.
|
|
||||||
local disable_filetypes = { c = true, cpp = true }
|
|
||||||
if disable_filetypes[vim.bo[bufnr].filetype] then
|
|
||||||
return nil
|
|
||||||
else
|
|
||||||
return {
|
|
||||||
timeout_ms = 500,
|
|
||||||
lsp_format = 'fallback',
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
formatters_by_ft = {
|
|
||||||
lua = { 'stylua' },
|
|
||||||
-- Conform can also run multiple formatters sequentially
|
|
||||||
-- python = { "isort", "black" },
|
|
||||||
--
|
|
||||||
-- You can use 'stop_after_first' to run the first available formatter from the list
|
|
||||||
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{ -- Autocompletion
|
{ -- Autocompletion
|
||||||
'saghen/blink.cmp',
|
'saghen/blink.cmp',
|
||||||
event = 'VimEnter',
|
event = 'VimEnter',
|
||||||
|
@ -965,18 +924,18 @@ require('lazy').setup({
|
||||||
-- Here are some example plugins that I've included in the Kickstart repository.
|
-- Here are some example plugins that I've included in the Kickstart repository.
|
||||||
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
||||||
--
|
--
|
||||||
-- require 'kickstart.plugins.debug',
|
require 'kickstart.plugins.debug',
|
||||||
-- require 'kickstart.plugins.indent_line',
|
-- require 'kickstart.plugins.indent_line',
|
||||||
-- require 'kickstart.plugins.lint',
|
-- require 'kickstart.plugins.lint',
|
||||||
-- require 'kickstart.plugins.autopairs',
|
-- require 'kickstart.plugins.autopairs',
|
||||||
-- require 'kickstart.plugins.neo-tree',
|
require 'kickstart.plugins.neo-tree',
|
||||||
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
||||||
|
|
||||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||||
-- This is the easiest way to modularize your config.
|
-- This is the easiest way to modularize your config.
|
||||||
--
|
--
|
||||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||||
-- { import = 'custom.plugins' },
|
{ import = 'custom.plugins' },
|
||||||
--
|
--
|
||||||
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
|
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
|
||||||
-- Or use telescope!
|
-- Or use telescope!
|
||||||
|
|
Loading…
Reference in New Issue