chore(nvim): configuration and plugin updates

This commit is contained in:
2023-09-20 08:27:14 +03:00
parent 6f3f977100
commit 43df368ec1
7 changed files with 81 additions and 5 deletions

View File

@@ -1,3 +1,19 @@
-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here
local keymap = vim.keymap.set
-- ╭──────────────────────────────────────────────────────────╮
-- │ Comment box │
-- ╰──────────────────────────────────────────────────────────╯
local cb = require("comment-box")
-- left aligned fixed size box with left aligned text
keymap({ "n", "v" }, "<Leader>bcb", cb.lbox, { desc = "Comment: Left aligned" })
-- centered adapted box with centered text
keymap({ "n", "v" }, "<Leader>bcc", cb.ccbox, { desc = "Comment: Centered" })
-- centered line
keymap("n", "<Leader>bcl", cb.cline, { desc = "Comment: Centered line" })
keymap("i", "<M-l>", cb.cline, { desc = "Comment: Centered line" })

View File

@@ -40,7 +40,7 @@ require("lazy").setup({
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = { "catppuccin", "tokyonight", "habamax" } },
install = { colorscheme = { "catppuccin" } },
checker = { enabled = true }, -- automatically check for plugin updates
performance = {
rtp = {

View File

@@ -80,7 +80,7 @@ return {
cmd = { "TabnineStatus", "TabnineDisable", "TabnineEnable", "TabnineToggle" },
event = "User",
opts = {
accept_keymap = "<C-CR>",
accept_keymap = "<C-e>",
dismiss_keymap = "<C-Esc>",
},
},

View File

@@ -0,0 +1,47 @@
return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, {
"php",
})
end,
},
{
"williamboman/mason.nvim",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, {
"phpactor",
})
end,
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
phpactor = {},
},
},
},
{
"mfussenegger/nvim-dap",
optional = true,
dependencies = {
"williamboman/mason.nvim",
opts = function(_, opts)
if type(opts.ensure_installed) == "table" then
table.insert(opts.ensure_installed, "php-debug-adapter")
end
end,
},
opts = function()
local dap = require("dap")
local path = require("mason-registry").get_package("php-debug-adapter"):get_install_path()
dap.adapters.php = {
type = "executable",
command = "node",
args = { path .. "/extension/out/phpDebug.js" },
}
end,
},
}

View File

@@ -1,7 +1,10 @@
return {
"neovim/nvim-lspconfig",
opts = {
servers = { eslint = {} },
servers = {
eslint = {},
tflint = {},
},
setup = {
eslint = function()
require("lazyvim.util").on_attach(function(client)

View File

@@ -0,0 +1,9 @@
return {
-- A neovim lua plugin to help easily manage multiple terminal windows
-- https://github.com/akinsho/toggleterm.nvim
{
"akinsho/toggleterm.nvim",
version = "*",
config = true,
},
}