New configs

This commit is contained in:
2024-05-18 23:46:28 +03:00
parent 7f13ec22ea
commit 5a3ae61e8b
11 changed files with 235 additions and 58 deletions

View File

@@ -0,0 +1,19 @@
return {
"kdheepak/lazygit.nvim",
cmd = {
"LazyGit",
"LazyGitConfig",
"LazyGitCurrentFile",
"LazyGitFilter",
"LazyGitFilterCurrentFile",
},
-- optional for floating window border decoration
dependencies = {
"nvim-lua/plenary.nvim",
},
-- setting the keybinding for LazyGit with 'keys' is recommended in
-- order to load the plugin when the command is run for the first time
keys = {
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "LazyGit" }
}
}

View File

@@ -6,6 +6,7 @@ return {
{'neovim/nvim-lspconfig'}, -- Required
{'williamboman/mason.nvim'}, -- Optional
{'williamboman/mason-lspconfig.nvim'}, -- Optional
{'lvimuser/lsp-inlayhints.nvim'},
-- Autocompletion
{'hrsh7th/nvim-cmp'}, -- Required
@@ -21,18 +22,29 @@ return {
},
init = function()
local lsp_zero = require('lsp-zero')
local ih = require('lsp-inlayhints')
ih.setup()
lsp_zero.on_attach(function(client, bufnr)
-- see :help lsp-zero-keybindings
-- to learn the available actions
lsp_zero.default_keymaps({buffer = bufnr})
-- see :help lsp-zero-keybindings
-- to learn the available actions
lsp_zero.default_keymaps({buffer = bufnr})
-- ih.on_attach(client, bufnr)
end)
require('mason').setup({})
require('mason-lspconfig').setup({
ensure_installed = {},
handlers = {
lsp_zero.default_setup,
},
ensure_installed = {},
handlers = {
function(server_name)
require('lspconfig')[server_name].setup({
on_attach = function(client, bufnr)
ih.on_attach(client, bufnr)
end,
})
end,
},
})
-- require('lspconfig').clangd.setup({})
end
};

View File

@@ -13,7 +13,7 @@ return {
},
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
sync_install = true,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
@@ -35,7 +35,7 @@ return {
disable = { },
-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
disable = function(lang, buf)
local max_filesize = 100 * 1024 -- 100 KB
local max_filesize = 1024 * 1024 * 1-- 1 MB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
@@ -46,7 +46,7 @@ return {
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
additional_vim_regex_highlighting = true,
},
}
end