feat(config): added new plugins

This commit is contained in:
2024-02-11 22:45:25 +03:00
parent a75ccc662c
commit 0b8227060e
27 changed files with 663 additions and 464 deletions

4
.luarc.json Normal file
View File

@@ -0,0 +1,4 @@
{
"diagnostics.disable": [
]
}

67
.php-cs-fixer.php Normal file
View File

@@ -0,0 +1,67 @@
<?php
declare(strict_types=1);
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
return
(new Config())
->setCacheFile(__DIR__ . '/storage/framework/cache/.php_cs')
->setFinder(
Finder::create()
->in([
__DIR__ . '/public',
__DIR__ . '/config',
__DIR__ . '/app',
__DIR__ . '/bootstrap',
__DIR__ . '/database',
__DIR__ . '/routes',
// __DIR__ . '/storage',
__DIR__ . '/tests',
])
->append([
__FILE__,
])
)
->setRules([
'@PSR12' => true,
'@PSR12:risky' => true,
'@PHP80Migration' => true,
'@PHP80Migration:risky' => true,
'@PHPUnit84Migration:risky' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'ordered_imports' => ['imports_order' => ['class', 'function', 'const']],
'concat_space' => ['spacing' => 'one'],
'cast_spaces' => ['space' => 'none'],
'binary_operator_spaces' => false,
'phpdoc_to_comment' => false,
'phpdoc_separation' => false,
'phpdoc_types_order' => ['null_adjustment' => 'always_last'],
'phpdoc_align' => false,
'operator_linebreak' => false,
'global_namespace_import' => true,
'blank_line_before_statement' => false,
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'fopen_flags' => ['b_mode' => true],
'php_unit_strict' => false,
'php_unit_test_class_requires_covers' => false,
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
'yoda_style' => false,
'final_class' => false,
'final_public_method_for_abstract_class' => true,
'self_static_accessor' => true,
'static_lambda' => true,
]);

2
.stylua.toml Normal file
View File

@@ -0,0 +1,2 @@
indent_type = "Spaces"
indent_width = 2

View File

@@ -209,7 +209,7 @@ return {
["<bs>"] = "navigate_up",
["."] = "set_root",
["H"] = "toggle_hidden",
["/"] = "fuzzy_finder",
-- ["/"] = "filter_on_submit",
["D"] = "fuzzy_finder_directory",
["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm
-- ["D"] = "fuzzy_sorter_directory",

View File

@@ -1,10 +1,84 @@
return {
{
"nvim-treesitter/nvim-treesitter",
opts = {
endwise = {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects",
},
event = "VeryLazy",
main = "nvim-treesitter.configs",
opts = {
ensure_installed = {
"bash",
"blade",
"css",
"html",
"javascript",
"json",
"lua",
"luadoc",
"markdown",
"markdown_inline",
"nix",
"org",
"php",
"phpdoc",
"query",
"rust",
"sql",
"svelte",
"typescript",
"regex",
"vim",
"yaml",
},
highlight = {
enable = false,
additional_vim_regex_highlighting = { "org" },
},
indent = {
enable = true,
},
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@conditional.outer",
["ic"] = "@conditional.inner",
["al"] = "@loop.outer",
["il"] = "@loop.inner",
},
},
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "gnn",
node_incremental = "grn",
scope_incremental = "grc",
node_decremental = "grm",
},
},
},
config = function(plug, config)
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config.blade = {
install_info = {
url = "https://github.com/EmranMR/tree-sitter-blade",
files = {"src/parser.c"},
branch = "main",
},
filetype = "blade"
}
vim.filetype.add({
pattern = {
['.*%.blade%.php'] = 'blade',
}
})
require(plug.main).setup(config);
end,
}

View File

@@ -5,7 +5,6 @@
"NeoColumn.nvim": { "branch": "main", "commit": "db7695c7c70fcacd290712deef659bca464634ee" },
"SchemaStore.nvim": { "branch": "main", "commit": "177cae4f44ddf7c166ef263956378ae308ff77ff" },
"SmoothCursor.nvim": { "branch": "main", "commit": "cc8780622a7b7c328f774762fa2d97d9f83be828" },
"animation.nvim": { "branch": "main", "commit": "fb77091ab72ec9971aee0562e7081182527aaa6a" },
"bufferline.nvim": { "branch": "main", "commit": "ac788fbc493839c1e76daa8d119934b715fdb90e" },
"catppuccin": { "branch": "main", "commit": "64dc309bc157779691be38bbfc5123584e0a4a85" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
@@ -20,12 +19,12 @@
"ctrlsf.vim": { "branch": "master", "commit": "32236a8b376d9311dec9b5fe795ca99d32060b13" },
"dashboard-nvim": { "branch": "master", "commit": "63df28409d940f9cac0a925df09d3dc369db9841" },
"dressing.nvim": { "branch": "master", "commit": "8b7ae53d7f04f33be3439a441db8071c96092d19" },
"everforest-nvim": { "branch": "main", "commit": "ee032e31d2e824e59c38207e4351032539addf99" },
"friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
"fzf": { "branch": "master", "commit": "82954258c1c9f61bb6bb764c51470ffbcee01b6c" },
"fzf.vim": { "branch": "master", "commit": "1e054c1d075d87903647db9320116d360eb8b024" },
"git-worktree.nvim": { "branch": "master", "commit": "f247308e68dab9f1133759b05d944569ad054546" },
"gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" },
"gruvbox.nvim": { "branch": "main", "commit": "6e4027ae957cddf7b193adfaec4a8f9e03b4555f" },
"harpoon": { "branch": "master", "commit": "867e212ac153e793f95b316d1731f3ca1894625e" },
"headlines.nvim": { "branch": "master", "commit": "e3d7bfdf40e41a020d966d35f8b48d75b90367d2" },
"hydra.nvim": { "branch": "master", "commit": "3ced42c0b6a6c85583ff0f221635a7f4c1ab0dd0" },
@@ -35,15 +34,14 @@
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
"markdown-preview.nvim": { "branch": "main", "commit": "cc05a30393e2bf9f12e2d59fc35a1aa928ed1727" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "9453e3d6cd2ca45d96e20f343e8f1b927364b630" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "8b70e7f1e0a4119c1234c3bde4a01c241cabcc74" },
"mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" },
"middleclass": { "branch": "master", "commit": "9fab4d5bca67262614960960ca35c4740eb2be2c" },
"mini.ai": { "branch": "main", "commit": "c28f7d7348f27425a180b1b7dcaa77651f8b71ee" },
"mini.bufremove": { "branch": "main", "commit": "f53c7f27e36009fe61563c11cde154b94a0e5b94" },
"mini.comment": { "branch": "main", "commit": "3d9c8009615857e982f09bc5357fc95f2a2175f3" },
"mini.pairs": { "branch": "main", "commit": "71f117fd57f930da6ef4126b24f594dd398bac26" },
"mini.surround": { "branch": "main", "commit": "af8129efcabe95fc08a233e9f91569829bed031f" },
"neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" },
"namespace.nvim": { "branch": "master", "commit": "1e7eb62a78879e2332a05fd41ceffcd69edf30a1" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" },
"neoconf.nvim": { "branch": "main", "commit": "64437787dba70fce50dad7bfbb97d184c5bc340f" },
"neodev.nvim": { "branch": "main", "commit": "c4ce017bd4bacf60bf59330cec9e93c5d5e104a6" },
"neogen": { "branch": "main", "commit": "70127baaff25611deaf1a29d801fc054ad9d2dc1" },
@@ -77,8 +75,8 @@
"nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" },
"nvim-web-devicons": { "branch": "master", "commit": "8b2e5ef9eb8a717221bd96cb8422686d65a09ed5" },
"pair-ls.nvim": { "branch": "master", "commit": "e7a8f55f54a6a1956b782ddefba79dc6bb308d1d" },
"persistence.nvim": { "branch": "main", "commit": "ad538bfd5336f1335cdb6fd4e0b0eebfa6e12f32" },
"phpactor.nvim": { "branch": "main", "commit": "0aa4ad09c2024e24d630c0ec616d65396caa39e0" },
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"refactoring.nvim": { "branch": "master", "commit": "156532476deb10b1b2a32cb38e1078b3f9951c42" },
@@ -97,6 +95,9 @@
"twilight.nvim": { "branch": "main", "commit": "8b7b50c0cb2dc781b2f4262a5ddd57571556d1e4" },
"vim-blade": { "branch": "master", "commit": "9534101808cc320eef003129a40cab04b026a20c" },
"vim-caddyfile": { "branch": "master", "commit": "24fe0720551883e407cb70ae1d7c03f162d1d5a0" },
"vim-dadbod": { "branch": "master", "commit": "9d3e3ce74a264642a41e8ae126be5afd095ef107" },
"vim-dadbod-completion": { "branch": "master", "commit": "c920cb0ba3dff4b1b0ed373e1c0b3007dec696c2" },
"vim-dadbod-ui": { "branch": "master", "commit": "165699c573469e6a95b48d35052f848c340c5911" },
"vim-dispatch": { "branch": "master", "commit": "6cc2691576f97d43f8751664d1a1a908b99927e5" },
"vim-dotenv": { "branch": "master", "commit": "5c51cfcf8d87280d6414e03cd6b253eb70ecb800" },
"vim-easy-align": { "branch": "master", "commit": "12dd6316974f71ce333e360c0260b4e1f81169c3" },
@@ -111,7 +112,6 @@
"vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" },
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
"vim-table-mode": { "branch": "master", "commit": "4ff8de2ac93431ee6d85a9e04177012752e6abdc" },
"vim-test": { "branch": "master", "commit": "84373ffca386edd667e09f2bf1024b1de7bdfdf1" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
"window-picker": { "branch": "main", "commit": "fd5d3348b3e254ca3134f97793b4a8c702c4ad1d" }
}

View File

@@ -46,7 +46,7 @@ map_tele("<leader>ph", "help_tags", { desc = "Neovim Help" })
map_tele("<leader>pe", "buffers", { desc = "Open buffers" })
map_tele("<leader>pr", "treesitter", { desc = "Treesitter buffer elements" })
map_tele("<leader>bb", "file_browser_relative", { desc = "Current directory" })
map_tele("<leader>bp", "file_browser", { desc = "Project directory" })
map_tele("<leader>pb", "file_browser", { desc = "Project directory" })
map_tele("<leader>gs", "git_status", { desc = "Git status" })
map_tele("<leader>ve", "diagnostics", { desc = "Diagnostic of the buffer" })
map_tele("<leader>po", "api_specs", { desc = "Openapi directory" })

View File

@@ -1,4 +1,5 @@
require "config.options"
-- autocmds and keymaps can wait to load
vim.api.nvim_create_autocmd("User", {
group = vim.api.nvim_create_augroup("LazyVim", { clear = true }),

View File

@@ -32,6 +32,11 @@ bind("n", "zz", "<Cmd>:update<CR>")
bind("n", ",<space>", "<Cmd>:nohlsearch<CR>" )
-- namespace php
vim.keymap.set("n", "<leader>u", "<cmd>GetClass<cr>")
vim.keymap.set("n", "<leader>un", "<cmd>Namespace<cr>")
--windows
-- bind("n", "<a-h>", "<Cmd><c-w>h<CR>")
-- nnoremap <a-h> <c-w>h

View File

@@ -6,7 +6,7 @@ if not vim.loop.fs_stat(lazypath) then
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
require('lazy').setup({
require("lazy").setup({
change_detection = { notify = false },
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
@@ -16,6 +16,7 @@ require('lazy').setup({
-- { import = "lazyvim.plugins.extras.dap.core" },
-- { import = "lazyvim.plugins.extras.coding.yanky" },
{ import = "lazyvim.plugins.extras.lang.markdown" },
-- { import = "lazyvim.plugins.extras.coding.copilot" },
-- { import = "lazyvim.plugins.extras.lang.typescript" },
{ import = "lazyvim.plugins.extras.lang.docker" },
{ import = "lazyvim.plugins.extras.lang.json" },
@@ -38,7 +39,15 @@ require('lazy').setup({
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
-- install = { colorscheme = { "tokyonight", "habamax" } },
checker = { enabled = true }, -- automatically check for plugin updates
checker = { enabled = true, notify = false }, -- automatically check for plugin updates
dev = {
path = "~/.config/nvim/lua/plugins",
fallback = true,
patterns = { "adalessa" },
},
ui = {
border = "rounded",
},
performance = {
rtp = {
-- disable some rtp plugins

View File

@@ -1,9 +1,16 @@
-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
vim.opt.guifont = "VictorMono Nerd Font:h12"
vim.g.mapleader = " "
vim.g.snippets = "luasnip"
-- highlight blade
vim.g.blade_custom_directives_pairs = {
livewire = "endlivewire",
error = "enderror",
}
vim.o.langmap =
"ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz"
@@ -12,11 +19,13 @@ vim.o.spelllang = "ru_ru,en_us"
vim.o.linebreak = true
vim.g.autoformat = false
vim.o.background = "dark" -- or "light" for light mode
local opt = vim.o
opt.mouse = ""
opt.number = true
opt.relativenumber = true
-- opt.relativenumber = true
opt.conceallevel = 3
opt.hidden = true
opt.expandtab = true
@@ -28,7 +37,7 @@ opt.errorbells = false
opt.wrap = false
opt.swapfile = false
opt.undofile = true
opt.undodir = os.getenv "HOME" .. "/.cache/nvim/undodir"
opt.undodir = os.getenv("HOME") .. "/.cache/nvim/undodir"
opt.hlsearch = false
opt.incsearch = true
opt.ignorecase = true
@@ -50,5 +59,6 @@ opt.signcolumn = "yes"
opt.equalalways = false
opt.splitkeep = "screen"
opt.shortmess = "filnxtToOFWIcC"
opt.termguicolors = true
require("lazyvim.util").get_root = vim.loop.cwd

View File

@@ -1,11 +0,0 @@
return {
"anuvyklack/animation.nvim",
dependencies = {
"anuvyklack/middleclass",
},
keys = {
{"<leader>aa", function ()
require("alpha.animations").redraw_buffer()
end}
},
}

View File

@@ -1,11 +1,49 @@
return {
"neanias/everforest-nvim",
lazy = false,
priority = 1000,
config = function()
vim.cmd.colorscheme "everforest"
vim.cmd "let g:everforest_better_performance = 1"
vim.cmd "let g:everforest_background = 'soft'"
vim.cmd "let g:airline_theme = 'everforest'"
require("everforest").setup({
-- Controls the "hardness" of the background. Options are "soft", "medium" or "hard".
background = "soft",
-- How much of the background should be transparent. 2 will have more UI components be transparent (e.g., status line background)
transparent_background_level = 2,
-- Whether italics should be used for keywords and more.
italics = true,
-- Disable italic fonts for comments. Comments are in italics by default, set this to `true` to make them _not_ italic!
disable_italic_comments = false,
-- The contrast of line numbers, indent lines, etc. Options are "high" or "low" (default).
ui_contrast = "low",
-- Dim inactive windows. Only works in Neovim.
dim_inactive_windows = true,
-- Some plugins support highlighting error/warning/info/hint texts, by default these texts are only underlined, but you can use this option to also highlight the background of them.
diagnostic_text_highlight = true,
-- Which color the diagnostic text should be. Options are "grey" or "colored" (default).
diagnostic_virtual_text = "grey",
-- Style used to make floating windows stand out from other windows. "bright" makes the background of these windows lighter than hl-Normal, whereas "dim" makes it darker.
float_style = "bright",
-- You can override specific highlights to use other groups or a hex color.
-- This function will be called with the highlights and color palette tables.
on_highlights = function(highlight_groups, palette)
-- Custom highlight overrides can go here
end,
-- You can override colors in the palette to use different hex colors.
-- This function will be called once the base and background colors have been mixed on the palette.
colours_override = function(palette)
-- Custom color overrides can go here
end,
})
vim.cmd("colorscheme everforest")
end,
-- "wuelnerdotexe/vim-enfocado",
-- lazy = false,
-- priority = 1000,
-- init = function()
-- vim.g.enfocado_style = "neon"
-- end,
-- config = function()
-- vim.cmd.colorscheme("enfocado")
-- end,
}

View File

@@ -20,16 +20,24 @@ return {
lua = { "stylua" },
python = { "isort", "black" },
javascript = { { "prettierd", "prettier" } },
php = { { "php-cs-fixer", "pretty-php" } },
php = { { "pretty-php" } },
-- php = { "pint" },
blade = { "blade-formatter" },
dart = { "dart" },
},
-- Set up format-on-save
format_on_save = { timeout_ms = 500, lsp_fallback = true },
-- Customize formatters
autoformat = true,
formatters = {
shfmt = {
prepend_args = { "-i", "2" },
},
dart = {
command = "dart",
args = { "format" },
stdin = true,
},
},
},
init = function()

26
lua/plugins/database.lua Normal file
View File

@@ -0,0 +1,26 @@
return {
"kristijanhusak/vim-dadbod-ui",
dependencies = {
"tpope/vim-dadbod",
"kristijanhusak/vim-dadbod-completion",
"tpope/vim-dotenv",
},
keys = { { "<leader><leader>db", ":tab DBUI<cr>", desc = "Open Database client" } },
init = function()
vim.g.db_ui_use_nerd_fonts = 1
vim.g.db_ui_show_database_icon = 1
vim.g.db_ui_force_echo_notifications = 1
vim.g.db_ui_win_position = "left"
vim.g.db_ui_winwidth = 80
vim.g.db_ui_table_helpers = {
mysql = {
Count = "select count(1) from {optional_schema}{table}",
Explain = "EXPLAIN {last_query}",
},
sqlite = {
Describe = "PRAGMA table_info({table})",
},
}
end,
}

View File

@@ -2,6 +2,9 @@ return {
{
"jwalton512/vim-blade",
enabled = true,
-- vim.g.blade_custom_directives_pairs = {
-- 'livewire': 'endlivewire',
-- },
},
{
"tpope/vim-dispatch",

View File

@@ -1,28 +0,0 @@
return {
"neovim/nvim-lspconfig",
dependencies = {
-- "jose-elias-alvarez/null-ls.nvim",
{
"williamboman/mason.nvim",
opts = {
ui = {
border = "rounded",
},
},
},
"folke/neodev.nvim",
"williamboman/mason-lspconfig.nvim",
"WhoIsSethDaniel/mason-tool-installer.nvim",
},
event = "VeryLazy",
main = "alpha.lsp",
opts = {
mason = {
enable = true,
auto_install = false,
},
servers = {
phpactor = { enable = true },
},
},
}

67
lua/plugins/lspconfig.lua Normal file
View File

@@ -0,0 +1,67 @@
return {
{
"neovim/nvim-lspconfig",
opts = {
diagnostics = {
underline = true,
virtual_text = false,
float = {
border = "rounded",
},
},
servers = {
kotlin_language_server = {},
bashls = {},
lemminx = {},
ltex = {
settings = {
ltex = {
language = "ru-RU",
},
},
},
},
},
},
}
-- return {
-- "neovim/nvim-lspconfig",
-- dependencies = {
-- -- "jose-elias-alvarez/null-ls.nvim",
-- {
-- "williamboman/mason.nvim",
-- opts = {
-- ui = {
-- border = "rounded",
-- },
-- },
-- },
-- "folke/neodev.nvim",
-- "williamboman/mason-lspconfig.nvim",
-- "WhoIsSethDaniel/mason-tool-installer.nvim",
-- },
-- event = "VeryLazy",
-- main = "alpha.lsp",
-- opts = {
-- mason = {
-- enable = true,
-- auto_install = false,
-- },
-- servers = {
-- phpactor = {
-- enable = true,
-- filetypes = { "php", "blade" },
-- settings = {
-- intelephense = {
-- filetypes = { "php", "blade" },
-- files = {
-- associations = { "*.php", "*.blade.php" }, -- Associating .blade.php files as well
-- maxSize = 5000000,
-- },
-- },
-- },
-- },
--
-- },
-- },
-- }

View File

@@ -1,254 +1,306 @@
return {
"nvim-neo-tree/neo-tree.nvim",
branch = "v2.x",
reqrires = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
{
-- only needed if you want to use the commands with "_with_window_picker" suffix
's1n7ax/nvim-window-picker',
tag = "v1.*",
config = function()
require 'window-picker'.setup({
autoselect_one = true,
include_current = false,
filter_rules = {
-- filter using buffer options
bo = {
-- if the file type is one of following, the window will be ignored
filetype = { 'neo-tree', "neo-tree-popup", "notify" },
-- if the buffer type is one of following, the window will be ignored
buftype = { 'terminal', "quickfix" },
},
},
other_win_hl_color = '#e35e4f',
})
end,
}
},
config = function()
-- Unless you are still migrating, remove the deprecated commands from v1.x
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
-- If you want icons for diagnostic errors, you'll need to define them somewhere:
vim.fn.sign_define("DiagnosticSignError",
{ text = "", texthl = "DiagnosticSignError" })
vim.fn.sign_define("DiagnosticSignWarn",
{ text = "", texthl = "DiagnosticSignWarn" })
vim.fn.sign_define("DiagnosticSignInfo",
{ text = "", texthl = "DiagnosticSignInfo" })
vim.fn.sign_define("DiagnosticSignHint",
{ text = "", texthl = "DiagnosticSignHint" })
-- NOTE: this is changed from v1.x, which used the old style of highlight groups
-- in the form "LspDiagnosticsSignWarning"
require("neo-tree").setup({
close_if_last_window = false, -- Close Neo-tree if it is the last window left in the tab
popup_border_style = "rounded",
enable_git_status = true,
enable_diagnostics = true,
sort_case_insensitive = false, -- used when sorting files and directories in the tree
sort_function = nil, -- use a custom function for sorting files and directories in the tree
-- sort_function = function (a,b)
-- if a.type == b.type then
-- return a.path > b.path
-- else
-- return a.type > b.type
-- end
-- end , -- this sorts files and directories descendantly
default_component_configs = {
container = {
enable_character_fade = true
},
indent = {
indent_size = 2,
padding = 1, -- extra padding on left hand side
-- indent guides
with_markers = true,
indent_marker = "│",
last_indent_marker = "└",
highlight = "NeoTreeIndentMarker",
-- expander config, needed for nesting files
with_expanders = nil, -- if nil and file nesting is enabled, will enable expanders
expander_collapsed = "",
expander_expanded = "",
expander_highlight = "NeoTreeExpander",
},
icon = {
folder_closed = "",
folder_open = "",
folder_empty = "ﰊ",
-- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there
-- then these will never be used.
default = "*",
highlight = "NeoTreeFileIcon"
},
modified = {
symbol = "[+]",
highlight = "NeoTreeModified",
},
name = {
trailing_slash = false,
use_git_status_colors = true,
highlight = "NeoTreeFileName",
},
git_status = {
symbols = {
-- Change type
added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
deleted = "✖", -- this can only be used in the git_status source
renamed = "", -- this can only be used in the git_status source
-- Status type
untracked = "",
ignored = "",
unstaged = "",
staged = "",
conflict = "",
}
},
},
window = {
position = "left",
width = 40,
mapping_options = {
noremap = true,
nowait = true,
},
mappings = {
["<space>"] = {
"toggle_node",
nowait = false, -- disable `nowait` if you have existing combos starting with this char that you want to use
},
["<2-LeftMouse>"] = "open",
["<cr>"] = "open",
["<esc>"] = "revert_preview",
["P"] = { "toggle_preview", config = { use_float = true } },
["l"] = "focus_preview",
["S"] = "open_split",
["s"] = "open_vsplit",
-- ["S"] = "split_with_window_picker",
-- ["s"] = "vsplit_with_window_picker",
["t"] = "open_tabnew",
-- ["<cr>"] = "open_drop",
-- ["t"] = "open_tab_drop",
["w"] = "open_with_window_picker",
--["P"] = "toggle_preview", -- enter preview mode, which shows the current node without focusing
["C"] = "close_node",
-- ['C'] = 'close_all_subnodes',
["z"] = "close_all_nodes",
--["Z"] = "expand_all_nodes",
["a"] = {
"add",
-- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details
-- some commands may take optional config options, see `:h neo-tree-mappings` for details
config = {
show_path = "none" -- "none", "relative", "absolute"
}
},
["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion.
["d"] = "delete",
["r"] = "rename",
["y"] = "copy_to_clipboard",
["x"] = "cut_to_clipboard",
["p"] = "paste_from_clipboard",
["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add":
-- ["c"] = {
-- "copy",
-- config = {
-- show_path = "none" -- "none", "relative", "absolute"
-- }
--}
["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add".
["q"] = "close_window",
["R"] = "refresh",
["?"] = "show_help",
["<"] = "prev_source",
[">"] = "next_source",
}
},
nesting_rules = {},
{
"nvim-neo-tree/neo-tree.nvim",
opts = {
-- window = {
-- mappings = {
-- ["o"] = "open",
-- },
-- },
filesystem = {
filtered_items = {
visible = false, -- when true, they will just be displayed differently than normal items
hide_dotfiles = true,
hide_gitignored = true,
hide_hidden = true, -- only works on Windows for hidden files/directories
hide_by_name = {
--"node_modules"
},
hide_by_pattern = { -- uses glob style patterns
--"*.meta",
--"*/src/*/tsconfig.json",
},
always_show = { -- remains visible even if other settings would normally hide it
--".gitignored",
},
never_show = { -- remains hidden even if visible is toggled to true, this overrides always_show
--".DS_Store",
--"thumbs.db"
},
never_show_by_pattern = { -- uses glob style patterns
--".null-ls_*",
bind_to_cwd = true,
window = {
mappings = {
["/"] = "none",
},
},
follow_current_file = false, -- This will find and focus the file in the active buffer every
-- time the current file is changed while the tree is open.
group_empty_dirs = false, -- when true, empty folders will be grouped together
hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree
-- in whatever position is specified in window.position
-- "open_current", -- netrw disabled, opening a directory opens within the
-- window like netrw would, regardless of window.position
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
use_libuv_file_watcher = false, -- This will use the OS level file watchers to detect changes
-- instead of relying on nvim autocmd events.
window = {
mappings = {
["<bs>"] = "navigate_up",
["."] = "set_root",
["H"] = "toggle_hidden",
["/"] = "fuzzy_finder",
["D"] = "fuzzy_finder_directory",
["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm
-- ["D"] = "fuzzy_sorter_directory",
["f"] = "filter_on_submit",
["<c-x>"] = "clear_filter",
["[g"] = "prev_git_modified",
["]g"] = "next_git_modified",
}
}
-- follow_current_file = { enabled = true },
},
buffers = {
follow_current_file = true, -- This will find and focus the file in the active buffer every
-- time the current file is changed while the tree is open.
group_empty_dirs = true, -- when true, empty folders will be grouped together
show_unloaded = true,
window = {
mappings = {
["bd"] = "buffer_delete",
["<bs>"] = "navigate_up",
["."] = "set_root",
}
},
},
git_status = {
window = {
position = "float",
mappings = {
["A"] = "git_add_all",
["gu"] = "git_unstage_file",
["ga"] = "git_add_file",
["gr"] = "git_revert_file",
["gc"] = "git_commit",
["gp"] = "git_push",
["gg"] = "git_commit_and_push",
}
}
}
})
vim.cmd([[nnoremap \ :Neotree reveal<cr>]])
end
},
},
}
-- return {
-- "nvim-neo-tree/neo-tree.nvim",
-- branch = "v2.x",
-- reqrires = {
-- "nvim-lua/plenary.nvim",
-- "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
-- "MunifTanjim/nui.nvim",
-- {
-- -- only needed if you want to use the commands with "_with_window_picker" suffix
-- 's1n7ax/nvim-window-picker',
-- tag = "v1.*",
-- config = function()
-- require 'window-picker'.setup({
-- autoselect_one = true,
-- include_current = false,
-- filter_rules = {
-- -- filter using buffer options
-- bo = {
-- -- if the file type is one of following, the window will be ignored
-- filetype = { 'neo-tree', "neo-tree-popup", "notify" },
--
-- -- if the buffer type is one of following, the window will be ignored
-- buftype = { 'terminal', "quickfix" },
-- },
-- },
-- other_win_hl_color = '#e35e4f',
-- })
-- end,
-- }
-- },
-- config = function()
-- -- Unless you are still migrating, remove the deprecated commands from v1.x
-- vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
--
-- -- If you want icons for diagnostic errors, you'll need to define them somewhere:
-- vim.fn.sign_define("DiagnosticSignError",
-- { text = " ", texthl = "DiagnosticSignError" })
-- vim.fn.sign_define("DiagnosticSignWarn",
-- { text = " ", texthl = "DiagnosticSignWarn" })
-- vim.fn.sign_define("DiagnosticSignInfo",
-- { text = " ", texthl = "DiagnosticSignInfo" })
-- vim.fn.sign_define("DiagnosticSignHint",
-- { text = "", texthl = "DiagnosticSignHint" })
-- -- NOTE: this is changed from v1.x, which used the old style of highlight groups
-- -- in the form "LspDiagnosticsSignWarning"
--
-- require("neo-tree").setup({
-- close_if_last_window = false, -- Close Neo-tree if it is the last window left in the tab
-- popup_border_style = "rounded",
-- enable_git_status = true,
-- enable_diagnostics = true,
-- sort_case_insensitive = false, -- used when sorting files and directories in the tree
-- sort_function = nil, -- use a custom function for sorting files and directories in the tree
-- -- sort_function = function (a,b)
-- -- if a.type == b.type then
-- -- return a.path > b.path
-- -- else
-- -- return a.type > b.type
-- -- end
-- -- end , -- this sorts files and directories descendantly
-- default_component_configs = {
-- container = {
-- enable_character_fade = true
-- },
-- indent = {
-- indent_size = 2,
-- padding = 1, -- extra padding on left hand side
-- -- indent guides
-- with_markers = true,
-- indent_marker = "│",
-- last_indent_marker = "└",
-- highlight = "NeoTreeIndentMarker",
-- -- expander config, needed for nesting files
-- with_expanders = nil, -- if nil and file nesting is enabled, will enable expanders
-- expander_collapsed = "",
-- expander_expanded = "",
-- expander_highlight = "NeoTreeExpander",
-- },
-- icon = {
-- folder_closed = "",
-- folder_open = "",
-- folder_empty = "ﰊ",
-- -- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there
-- -- then these will never be used.
-- default = "*",
-- highlight = "NeoTreeFileIcon"
-- },
-- modified = {
-- symbol = "[+]",
-- highlight = "NeoTreeModified",
-- },
-- name = {
-- trailing_slash = false,
-- use_git_status_colors = true,
-- highlight = "NeoTreeFileName",
-- },
-- git_status = {
-- symbols = {
-- -- Change type
-- added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name
-- modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
-- deleted = "✖", -- this can only be used in the git_status source
-- renamed = "", -- this can only be used in the git_status source
-- -- Status type
-- untracked = "",
-- ignored = "",
-- unstaged = "",
-- staged = "",
-- conflict = "",
-- }
-- },
-- },
-- window = {
-- position = "left",
-- width = 40,
-- mapping_options = {
-- noremap = true,
-- nowait = true,
-- },
-- mappings = {
-- ["<space>"] = {
-- "toggle_node",
-- nowait = false, -- disable `nowait` if you have existing combos starting with this char that you want to use
-- },
-- ["<2-LeftMouse>"] = "open",
-- ["<cr>"] = "open",
-- ["<esc>"] = "revert_preview",
-- ["P"] = { "toggle_preview", config = { use_float = true } },
-- ["l"] = "focus_preview",
-- ["S"] = "open_split",
-- ["s"] = "open_vsplit",
-- -- ["S"] = "split_with_window_picker",
-- -- ["s"] = "vsplit_with_window_picker",
-- ["t"] = "open_tabnew",
-- -- ["<cr>"] = "open_drop",
-- -- ["t"] = "open_tab_drop",
-- ["w"] = "open_with_window_picker",
-- --["P"] = "toggle_preview", -- enter preview mode, which shows the current node without focusing
-- ["C"] = "close_node",
-- -- ['C'] = 'close_all_subnodes',
-- ["z"] = "close_all_nodes",
-- --["Z"] = "expand_all_nodes",
-- ["a"] = {
-- "add",
-- -- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details
-- -- some commands may take optional config options, see `:h neo-tree-mappings` for details
-- config = {
-- show_path = "none" -- "none", "relative", "absolute"
-- }
-- },
-- ["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion.
-- ["d"] = "delete",
-- ["r"] = "rename",
-- ["y"] = "copy_to_clipboard",
-- ["x"] = "cut_to_clipboard",
-- ["p"] = "paste_from_clipboard",
-- ["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add":
-- -- ["c"] = {
-- -- "copy",
-- -- config = {
-- -- show_path = "none" -- "none", "relative", "absolute"
-- -- }
-- --}
-- ["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add".
-- ["q"] = "close_window",
-- ["R"] = "refresh",
-- ["?"] = "show_help",
-- ["<"] = "prev_source",
-- [">"] = "next_source",
-- }
-- },
-- nesting_rules = {},
-- filesystem = {
-- filtered_items = {
-- visible = false, -- when true, they will just be displayed differently than normal items
-- hide_dotfiles = true,
-- hide_gitignored = true,
-- hide_hidden = true, -- only works on Windows for hidden files/directories
-- hide_by_name = {
-- --"node_modules"
-- },
-- hide_by_pattern = { -- uses glob style patterns
-- --"*.meta",
-- --"*/src/*/tsconfig.json",
-- },
-- always_show = { -- remains visible even if other settings would normally hide it
-- --".gitignored",
-- },
-- never_show = { -- remains hidden even if visible is toggled to true, this overrides always_show
-- --".DS_Store",
-- --"thumbs.db"
-- },
-- never_show_by_pattern = { -- uses glob style patterns
-- --".null-ls_*",
-- },
-- },
-- follow_current_file = false, -- This will find and focus the file in the active buffer every
-- -- time the current file is changed while the tree is open.
-- group_empty_dirs = false, -- when true, empty folders will be grouped together
-- hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree
-- -- in whatever position is specified in window.position
-- -- "open_current", -- netrw disabled, opening a directory opens within the
-- -- window like netrw would, regardless of window.position
-- -- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
-- use_libuv_file_watcher = false, -- This will use the OS level file watchers to detect changes
-- -- instead of relying on nvim autocmd events.
-- window = {
-- mappings = {
-- ["<bs>"] = "navigate_up",
-- ["."] = "set_root",
-- ["H"] = "toggle_hidden",
-- ["/"] = "fuzzy_finder",
-- ["D"] = "fuzzy_finder_directory",
-- ["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm
-- -- ["D"] = "fuzzy_sorter_directory",
-- ["f"] = "filter_on_submit",
-- ["<c-x>"] = "clear_filter",
-- ["[g"] = "prev_git_modified",
-- ["]g"] = "next_git_modified",
-- }
-- }
-- },
-- buffers = {
-- follow_current_file = true, -- This will find and focus the file in the active buffer every
-- -- time the current file is changed while the tree is open.
-- group_empty_dirs = true, -- when true, empty folders will be grouped together
-- show_unloaded = true,
-- window = {
-- mappings = {
-- ["bd"] = "buffer_delete",
-- ["<bs>"] = "navigate_up",
-- ["."] = "set_root",
-- }
-- },
-- },
-- git_status = {
-- window = {
-- position = "float",
-- mappings = {
-- ["A"] = "git_add_all",
-- ["gu"] = "git_unstage_file",
-- ["ga"] = "git_add_file",
-- ["gr"] = "git_revert_file",
-- ["gc"] = "git_commit",
-- ["gp"] = "git_push",
-- ["gg"] = "git_commit_and_push",
-- }
-- }
-- }
-- })
--
-- vim.cmd([[nnoremap \ :Neotree reveal<cr>]])
-- end
-- }

22
lua/plugins/pair-ls.lua Normal file
View File

@@ -0,0 +1,22 @@
return {
"stevearc/pair-ls.nvim",
-- Call the setup function
opts = {
-- The pair-ls command to run
cmd = { "pair-ls", "lsp", "-port", "8099" },
-- The function configures the root directory for the server
root_dir = function(fname, util)
return util.root_pattern(".git", ".hg")(fname) or vim.loop.cwd()
end,
-- Pass a function here to run custom logic on attach
on_attach = function(client, bufnr) end,
-- See :help vim.lsp.start_client
flags = {
allow_incremental_sync = true,
debounce_text_changes = nil,
},
}
}

View File

@@ -1,61 +0,0 @@
local phpactor = function ()
vim.ui.select({
"class_inflect",
"context_menu",
"expand_class",
"generate_accessor",
"change_visibility",
"copy_class",
"import_class",
"import_missing_classes",
"move_class",
"navigate",
"new_class",
"transform",
"update",
"config",
"status",
"cache_clear",
}, {
prompt = "Phpactor Action",
}, function(choice)
if choice == nil or choice == "" then
return
end
-- TODO: add option for new class in same directory
if choice == "new_class" then
return vim.ui.input({
prompt = "New Class",
}, function(value)
if value == nil then
return
end
-- TODO: check filename generation to validate the path
require("phpactor").rpc("new_class", { text_value = vim.fn.getcwd() .. '/' .. value .. ".php" })
end)
end
require("phpactor").rpc(choice, {})
end)
end
return {
"adalessa/phpactor.nvim",
cmd = { "PhpActor" },
keys = {
{ "<leader>pa", phpactor, desc = "PhpActor options" },
{ "<leader>pc", ":PhpActor context_menu<cr>", desc = "PhpActor context menu" },
},
dependencies = {
"nvim-lua/plenary.nvim",
},
opts = {
install = {
bin = 'phpactor'
},
lspconfig = {
enabled = true,
},
},
}

View File

@@ -129,7 +129,7 @@ end
return {
"L3MON4D3/LuaSnip",
version = "v1.*",
version = "v2.*",
event = "VeryLazy",
config = function()
config()

View File

@@ -1,99 +1,10 @@
-- return {
-- {
-- "nvim-treesitter/nvim-treesitter",
-- opts = {
-- endwise = {
-- enable = true,
-- },
-- },
-- },
-- }
return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects",
},
event = "VeryLazy",
main = "nvim-treesitter.configs",
opts = {
ensure_installed = {
"c",
"lua",
"rust",
"bash",
"blade",
"css",
"go",
"gomod",
"html",
"javascript",
"json",
"lua",
"luadoc",
"markdown",
"markdown_inline",
"nix",
"org",
"php",
"phpdoc",
"query",
"rust",
"sql",
"svelte",
"typescript",
"regex",
"vim",
"yaml",
},
highlight = {
enable = true,
additional_vim_regex_highlighting = { "org" },
},
indent = {
enable = true,
},
textobjects = {
select = {
{
"nvim-treesitter/nvim-treesitter",
opts = {
endwise = {
enable = true,
lookahead = true,
keymaps = {
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@conditional.outer",
["ic"] = "@conditional.inner",
["al"] = "@loop.outer",
["il"] = "@loop.inner",
},
},
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "gnn",
node_incremental = "grn",
scope_incremental = "grc",
node_decremental = "grm",
},
},
},
config = function(plug, config)
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config.blade = {
install_info = {
url = "https://github.com/EmranMR/tree-sitter-blade",
files = {"src/parser.c"},
branch = "main",
},
filetype = "blade"
}
vim.filetype.add({
pattern = {
['.*%.blade%.php'] = 'blade',
}
})
require(plug.main).setup(config);
end,
}

BIN
spell/ru.utf-8.spl Normal file

Binary file not shown.

BIN
spell/ru.utf-8.sug Normal file

Binary file not shown.