Updated nvim config
This commit is contained in:
parent
1674811bdf
commit
ebdc447125
@ -52,6 +52,11 @@ vim.o.showtabline = 0
|
||||
|
||||
vim.o.wrap = true
|
||||
|
||||
vim.o.foldmethod = "expr"
|
||||
vim.o.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
vim.o.nofoldenable = true
|
||||
vim.o.foldlevelstart = 99
|
||||
|
||||
-- show cursor line only in active window
|
||||
local cursorLineGrp = vim.api.nvim_create_augroup("CursorLine", { clear = true })
|
||||
vim.api.nvim_create_autocmd(
|
||||
@ -63,6 +68,7 @@ vim.api.nvim_create_autocmd(
|
||||
{ pattern = "*", command = "set nocursorline", group = cursorLineGrp }
|
||||
)
|
||||
|
||||
|
||||
-- Auto format on save
|
||||
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]
|
||||
|
||||
@ -109,11 +115,18 @@ require('lazy').setup({
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
-- follow latest release.
|
||||
version = "v2.*", -- Replace <CurrentMajor> by the latest released major (first number of latest release)
|
||||
-- install jsregexp (optional!).
|
||||
build = "make install_jsregexp"
|
||||
},
|
||||
|
||||
{
|
||||
'hrsh7th/nvim-cmp',
|
||||
dependencies = {
|
||||
'onsails/lspkind.nvim',
|
||||
'L3MON4D3/LuaSnip',
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'rafamadriz/friendly-snippets',
|
||||
@ -123,23 +136,23 @@ require('lazy').setup({
|
||||
},
|
||||
},
|
||||
|
||||
-- {
|
||||
-- 'zbirenbaum/copilot-cmp',
|
||||
-- event = { 'BufRead', 'BufNewFile' },
|
||||
-- dependencies = {
|
||||
-- {
|
||||
-- 'zbirenbaum/copilot.lua',
|
||||
-- config = function()
|
||||
-- require('copilot').setup {
|
||||
-- suggestion = { enabled = false },
|
||||
-- panel = { enabled = false },
|
||||
-- filetypes = { markdown = true },
|
||||
-- }
|
||||
-- end,
|
||||
-- },
|
||||
-- },
|
||||
-- config = function() require('copilot_cmp').setup() end,
|
||||
-- },
|
||||
{
|
||||
'zbirenbaum/copilot-cmp',
|
||||
event = { 'BufRead', 'BufNewFile' },
|
||||
dependencies = {
|
||||
{
|
||||
'zbirenbaum/copilot.lua',
|
||||
config = function()
|
||||
require('copilot').setup {
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
filetypes = { markdown = true },
|
||||
}
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function() require('copilot_cmp').setup() end,
|
||||
},
|
||||
|
||||
{
|
||||
-- Highlight, edit, and navigate code
|
||||
@ -415,12 +428,11 @@ require('lazy').setup({
|
||||
{
|
||||
-- Add indentation guides even on blank lines
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
main = "ibl",
|
||||
opts = {
|
||||
show_trailing_blankline_indent = false,
|
||||
use_treesitter = true,
|
||||
char = "▏",
|
||||
context_char = "▏",
|
||||
show_current_context = true,
|
||||
scope = {
|
||||
show_end = false,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -822,7 +834,6 @@ require('nvim-treesitter.configs').setup {
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
-- resizing splits
|
||||
vim.keymap.set({ 'n', 't' }, '<A-h>', require('smart-splits').resize_left, { desc = 'Resize left' })
|
||||
vim.keymap.set({ 'n', 't' }, '<A-j>', require('smart-splits').resize_down, { desc = 'Resize down' })
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user