mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-11-09 03:03:50 +00:00
refact: stylua
This commit is contained in:
parent
a694c380d0
commit
455691bd8d
16
init.lua
16
init.lua
@ -94,7 +94,7 @@ require('lazy').setup({
|
|||||||
{
|
{
|
||||||
-- Autocompletion
|
-- Autocompletion
|
||||||
'hrsh7th/nvim-cmp',
|
'hrsh7th/nvim-cmp',
|
||||||
dependencies = { 'hrsh7th/cmp-nvim-lsp', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip',"rafamadriz/friendly-snippets", },
|
dependencies = { 'hrsh7th/cmp-nvim-lsp', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip', 'rafamadriz/friendly-snippets' },
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Useful plugin to show you pending keybinds.
|
-- Useful plugin to show you pending keybinds.
|
||||||
@ -115,7 +115,7 @@ require('lazy').setup({
|
|||||||
vim.keymap.set('n', '[c', require('gitsigns').prev_hunk, { buffer = bufnr, desc = 'Go to Previous Hunk' })
|
vim.keymap.set('n', '[c', require('gitsigns').prev_hunk, { buffer = bufnr, desc = 'Go to Previous Hunk' })
|
||||||
vim.keymap.set('n', ']c', require('gitsigns').next_hunk, { buffer = bufnr, desc = 'Go to Next Hunk' })
|
vim.keymap.set('n', ']c', require('gitsigns').next_hunk, { buffer = bufnr, desc = 'Go to Next Hunk' })
|
||||||
vim.keymap.set('n', '<leader>ph', require('gitsigns').preview_hunk, { buffer = bufnr, desc = '[P]review [H]unk' })
|
vim.keymap.set('n', '<leader>ph', require('gitsigns').preview_hunk, { buffer = bufnr, desc = '[P]review [H]unk' })
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -178,7 +178,7 @@ require('lazy').setup({
|
|||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||||
},
|
},
|
||||||
build = ":TSUpdate",
|
build = ':TSUpdate',
|
||||||
},
|
},
|
||||||
|
|
||||||
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
|
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
|
||||||
@ -361,10 +361,10 @@ require('nvim-treesitter.configs').setup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Diagnostic keymaps
|
-- Diagnostic keymaps
|
||||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = "Go to previous diagnostic message" })
|
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' })
|
||||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = "Go to next diagnostic message" })
|
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' })
|
||||||
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = "Open floating diagnostic message" })
|
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
|
||||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = "Open diagnostics list" })
|
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
|
||||||
|
|
||||||
-- LSP settings.
|
-- LSP settings.
|
||||||
-- This function gets run when an LSP connects to a particular buffer.
|
-- This function gets run when an LSP connects to a particular buffer.
|
||||||
@ -458,7 +458,7 @@ mason_lspconfig.setup_handlers {
|
|||||||
-- nvim-cmp setup
|
-- nvim-cmp setup
|
||||||
local cmp = require 'cmp'
|
local cmp = require 'cmp'
|
||||||
local luasnip = require 'luasnip'
|
local luasnip = require 'luasnip'
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
require('luasnip.loaders.from_vscode').lazy_load()
|
||||||
luasnip.config.setup {}
|
luasnip.config.setup {}
|
||||||
|
|
||||||
cmp.setup {
|
cmp.setup {
|
||||||
|
Loading…
Reference in New Issue
Block a user