diff --git a/install.sh b/install.sh index 8ed82a2..480093e 100755 --- a/install.sh +++ b/install.sh @@ -33,9 +33,9 @@ if test (string match -ri "ru" "$LANG") case LSP_VSCODE-LANGSERVERS_INSTALLED set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[РАБОТА] "; set_color white; echo "Установлены LSP-сервера от VSCode (JSON, HTML, CSS) (\"hrsh7th/vscode-langservers-extracted\")"; case LSP_EMMET_INSTALL - set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[ЗАДАЧА] "; set_color white; echo "Установить LSP-сервер для набора инструментов Emmet (HTML из CSS)? (\"aca/emmet-ls\") (y/N) "; + set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[ЗАДАЧА] "; set_color white; echo "Установить LSP-сервер для набора инструментов Emmet (HTML и CSS)? (\"aca/emmet-ls\") (y/N) "; case LSP_EMMET_INSTALLED - set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[РАБОТА] "; set_color white; echo "Установлен LSP-сервер для набора инструментов Emmet (HTML из CSS) (\"aca/emmet-ls\")"; + set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[РАБОТА] "; set_color white; echo "Установлен LSP-сервер для набора инструментов Emmet (HTML и CSS) (\"aca/emmet-ls\")"; case LSP_CSSMODULES_INSTALL set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[ЗАДАЧА] "; set_color white; echo "Установить LSP-сервер для CSS (форматировщик)? (\"antonk52/cssmodules-language-server\") (y/N) "; case LSP_CSSMODULES_INSTALLED @@ -166,9 +166,17 @@ if set -q _flag_update fnm install $NODEJS_VERSION # need to rewrite in the future (бляяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяя) - sudo apt install -y npm universal-ctags python3-venv python3-pip rubygems ruby-dev pkg-config lua5.4 luarocks ripgrep - python3 -m pip install --upgrade pip + sudo apt install -y npm universal-ctags python3-venv python3-virtualenv python3-pip rubygems ruby-dev pkg-config lua5.4 luarocks ripgrep + + python3 -m virtualenv ~/.config/nvim/python + source ~/.config/nvim/python/bin/activate.fish + + # ~/.config/nvim/python/bin/python3 -m pip install --upgrade pip + # ~/.config/nvim/python/bin/pip install --upgrade pynvim + + python3 -m pip install --upgrade pip pip install --upgrade pynvim + sudo gem install neovim # Install NeoVim module for NPM @@ -212,7 +220,7 @@ sudo apt install -y build-essential flex bison libisl-dev texinfo texlive # ../configure --disable-sanity-checks # Initializing the virtual environment for Python packages -python3 -m venv ~/.local --system-site-packages +~/.config/nvim/python/bin/python3 -m venv ~/.local --system-site-packages if not set -q _flag_force # Installation request @@ -374,6 +382,7 @@ if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE") cd ~/ git clone https://github.com/xdebug/vscode-php-debug.git cd vscode-php-debug + git pull npm install && npm run build end &> $output diff --git a/lazy-lock.json b/lazy-lock.json index 46f5bdb..f217d90 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,42 +1,45 @@ { + "blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" }, "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, - "coq.artifacts": { "branch": "artifacts", "commit": "ef5f21d638ccc456cfa5b8d0ab37093cefe48c8b" }, - "coq.thirdparty": { "branch": "3p", "commit": "2bd969a2bcd2624f9c260b1000957c7e665e308e" }, - "coq_nvim": { "branch": "coq", "commit": "d939a34ceb2b57d2937890337a4aa75eb55e18a8" }, + "cmp-git": { "branch": "main", "commit": "b24309c386c9666c549a1abaedd4956541676d06" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" }, "diaglist.nvim": { "branch": "master", "commit": "8aba9fcf62cc60e1d5ce941faedecc399d9a1e8b" }, - "fidget.nvim": { "branch": "main", "commit": "64463022a1f2ff1318ab22a2ea4125ed9313a483" }, + "fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" }, "flexoki": { "branch": "main", "commit": "079554c242a86be5d1a95598c7c6368d6eedd7a3" }, - "gitsigns.nvim": { "branch": "main", "commit": "42d6aed4e94e0f0bbced16bbdcc42f57673bd75e" }, + "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, + "gitsigns.nvim": { "branch": "main", "commit": "abf82a65f185bd54adc0679f74b7d6e1ada690c9" }, "jsctags": { "branch": "master", "commit": "22d3fb848c429d4704dc3a8946bc3a4423a8e4a4" }, "kommentary": { "branch": "main", "commit": "d5a111a3bc4109a8f913a5863c9092b3b3801482" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, + "lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" }, "lsp-colors.nvim": { "branch": "main", "commit": "2bbe7541747fd339bdd8923fc45631a09bb4f1e5" }, - "lspkind-nvim": { "branch": "master", "commit": "3ddd1b4edefa425fda5a9f95a4f25578727c0bb3" }, + "lspkind-nvim": { "branch": "master", "commit": "c7274c48137396526b59d86232eabcdc7fed8a32" }, "lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, "lush.nvim": { "branch": "main", "commit": "9c60ec2279d62487d942ce095e49006af28eed6e" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" }, "nginx.vim": { "branch": "master", "commit": "cffaec54f0c7f9518de053634413a20e90eac825" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" }, - "nvim-dap": { "branch": "master", "commit": "cdfd55a133f63228c55f91378f12908cb2a78ded" }, + "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, + "nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" }, + "nvim-dap": { "branch": "master", "commit": "e47878dcf1ccc30136b30d19ab19fe76946d61cd" }, "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" }, - "nvim-lint": { "branch": "master", "commit": "ca6ea12daf0a4d92dc24c5c9ae22a1f0418ade37" }, - "nvim-lspconfig": { "branch": "master", "commit": "92ee7d42320edfbb81f3cad851314ab197fa324a" }, + "nvim-lint": { "branch": "master", "commit": "bcd1a44edbea8cd473af7e7582d3f7ffc60d8e81" }, + "nvim-lspconfig": { "branch": "master", "commit": "3f58aeca0c6ece8a9fb8782ea3fcb6024f285be3" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, - "nvim-treesitter": { "branch": "main", "commit": "5a7e5638e7d220575b1c22c8a2e099b52231886e" }, + "nvim-treesitter": { "branch": "main", "commit": "4967fa48b0fe7a7f92cee546c76bb4bb61bb14d5" }, "nvim-web-devicons": { "branch": "master", "commit": "803353450c374192393f5387b6a0176d0972b848" }, "phpctags": { "branch": "master", "commit": "5ed731eb86227d416977b0a1fd06e77e58363818" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "reticle.nvim": { "branch": "main", "commit": "66bfa2b1c28fd71bb8ae4e871e0cd9e9c509ea86" }, "tagbar": { "branch": "master", "commit": "7bfffca1f121afb7a9e38747500bf5270e006bb1" }, "telescope-dap.nvim": { "branch": "master", "commit": "783366bd6c1e7fa0a5c59c07db37f49c805a28df" }, - "telescope.nvim": { "branch": "master", "commit": "3333a52ff548ba0a68af6d8da1e54f9cd96e9179" }, + "telescope.nvim": { "branch": "master", "commit": "ad7d9580338354ccc136e5b8f0aa4f880434dcdc" }, "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, "vim-fish": { "branch": "master", "commit": "50b95cbbcd09c046121367d49039710e9dc9c15f" }, "vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" }, "vim-signify": { "branch": "master", "commit": "9ec7989ef5f92c5073de26abb46fc6a998b75ef8" }, - "vim-test": { "branch": "master", "commit": "aa619692ff48a3cf3e6bdb893765039488d4e5f3" }, + "vim-test": { "branch": "master", "commit": "c569b3620d0e53572efc95159f66ace5e7b06b48" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } } diff --git a/lua/autocommands.lua b/lua/autocommands.lua index d47670c..42b2556 100644 --- a/lua/autocommands.lua +++ b/lua/autocommands.lua @@ -1,10 +1,10 @@ -vim.api.nvim_create_autocmd({'BufEnter','BufAdd','BufNew','BufNewFile','BufWinEnter'}, { - group = vim.api.nvim_create_augroup('TS_FOLD_WORKAROUND', {}), - callback = function() +vim.api.nvim_create_autocmd({ 'BufEnter', 'BufAdd', 'BufNew', 'BufNewFile', 'BufWinEnter' }, { + group = vim.api.nvim_create_augroup('TS_FOLD_WORKAROUND', {}), + callback = function() -- Folding code method - -- vim.opt.foldmethod = 'expr' + -- vim.opt.foldmethod = 'expr' -- Expression for folding code - -- vim.opt.foldexpr = 'nvim_treesitter#foldexpr()' - end + -- vim.opt.foldexpr = 'nvim_treesitter#foldexpr()' + end }) diff --git a/lua/keymaps/plugins.lua b/lua/keymaps/plugins.lua index 1e44031..bd25a11 100644 --- a/lua/keymaps/plugins.lua +++ b/lua/keymaps/plugins.lua @@ -13,7 +13,7 @@ vim.keymap.set({ 'n', 'v', 't' }, 'F', function() else -- LSP-server clients not found - -- vim.api.nvim_exec('PrettierAsync', false) + vim.api.nvim_exec('PrettierAsync', false) end end, { noremap = true, silent = true, buffer = bufnr } @@ -64,20 +64,21 @@ vim.keymap.set('n', '', function() require('dap').step_into() end) vim.keymap.set('n', '', function() require('dap').step_out() end) vim.keymap.set('n', 'b', function() require('dap').toggle_breakpoint() end) vim.keymap.set('n', 'B', function() require('dap').set_breakpoint() end) -vim.keymap.set('n', 'lp', function() require('dap').set_breakpoint(nil, nil, vim.fn.input('Log point message: ')) end) +vim.keymap.set('n', 'lp', + function() require('dap').set_breakpoint(nil, nil, vim.fn.input('Log point message: ')) end) vim.keymap.set('n', 'dr', function() require('dap').repl.open() end) vim.keymap.set('n', 'dl', function() require('dap').run_last() end) -vim.keymap.set({'n', 'v'}, 'dh', function() - require('dap.ui.widgets').hover() +vim.keymap.set({ 'n', 'v' }, 'dh', function() + require('dap.ui.widgets').hover() end) -vim.keymap.set({'n', 'v'}, 'dp', function() - require('dap.ui.widgets').preview() +vim.keymap.set({ 'n', 'v' }, 'dp', function() + require('dap.ui.widgets').preview() end) vim.keymap.set('n', 'df', function() - local widgets = require('dap.ui.widgets') - widgets.centered_float(widgets.frames) + local widgets = require('dap.ui.widgets') + widgets.centered_float(widgets.frames) end) vim.keymap.set('n', 'ds', function() - local widgets = require('dap.ui.widgets') - widgets.centered_float(widgets.scopes) + local widgets = require('dap.ui.widgets') + widgets.centered_float(widgets.scopes) end) diff --git a/lua/keymaps/system.lua b/lua/keymaps/system.lua index ebc81dd..ef82bbc 100644 --- a/lua/keymaps/system.lua +++ b/lua/keymaps/system.lua @@ -1,19 +1,19 @@ -- Offset -vim.keymap.set({'i'}, '', '>', {noremap = true, silent = true}) -vim.keymap.set({'i'}, '', '<', {noremap = true, silent = true}) -vim.keymap.set({'v', 't'}, '', '>', {noremap = true, silent = true}) -vim.keymap.set({'v', 't'}, '', '<', {noremap = true, silent = true}) +vim.keymap.set({ 'i' }, '', '>', { noremap = true, silent = true }) +vim.keymap.set({ 'i' }, '', '<', { noremap = true, silent = true }) +vim.keymap.set({ 'v', 't' }, '', '>', { noremap = true, silent = true }) +vim.keymap.set({ 'v', 't' }, '', '<', { noremap = true, silent = true }) -- Disabling arrows -vim.keymap.set({'n', 'i', 'v', 't'}, '', '', {noremap = true, silent = true}) -vim.keymap.set({'n', 'i', 'v', 't'}, '', '', {noremap = true, silent = true}) -vim.keymap.set({'n', 'i', 'v', 't'}, '', '', {noremap = true, silent = true}) -vim.keymap.set({'n', 'i', 'v', 't'}, '', '', {noremap = true, silent = true}) -vim.keymap.set({'n', 'i', 'v', 't'}, '', '', {noremap = true, silent = true}) -vim.keymap.set({'n', 'i', 'v', 't'}, '', '', {noremap = true, silent = true}) -vim.keymap.set({'n', 'i', 'v', 't'}, '', '', {noremap = true, silent = true}) -vim.keymap.set({'n', 'i', 'v', 't'}, '', '', {noremap = true, silent = true}) -vim.keymap.set({'n', 'i', 'v', 't'}, '', '', {noremap = true, silent = true}) -vim.keymap.set({'n', 'i', 'v', 't'}, '', '', {noremap = true, silent = true}) -vim.keymap.set({'n', 'i', 'v', 't'}, '', '', {noremap = true, silent = true}) -vim.keymap.set({'n', 'i', 'v', 't'}, '', '', {noremap = true, silent = true}) +vim.keymap.set({ 'n', 'i', 'v', 't' }, '', '', { noremap = true, silent = true }) +vim.keymap.set({ 'n', 'i', 'v', 't' }, '', '', { noremap = true, silent = true }) +vim.keymap.set({ 'n', 'i', 'v', 't' }, '', '', { noremap = true, silent = true }) +vim.keymap.set({ 'n', 'i', 'v', 't' }, '', '', { noremap = true, silent = true }) +vim.keymap.set({ 'n', 'i', 'v', 't' }, '', '', { noremap = true, silent = true }) +vim.keymap.set({ 'n', 'i', 'v', 't' }, '', '', { noremap = true, silent = true }) +vim.keymap.set({ 'n', 'i', 'v', 't' }, '', '', { noremap = true, silent = true }) +vim.keymap.set({ 'n', 'i', 'v', 't' }, '', '', { noremap = true, silent = true }) +vim.keymap.set({ 'n', 'i', 'v', 't' }, '', '', { noremap = true, silent = true }) +vim.keymap.set({ 'n', 'i', 'v', 't' }, '', '', { noremap = true, silent = true }) +vim.keymap.set({ 'n', 'i', 'v', 't' }, '', '', { noremap = true, silent = true }) +vim.keymap.set({ 'n', 'i', 'v', 't' }, '', '', { noremap = true, silent = true }) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua new file mode 100644 index 0000000..eec1434 --- /dev/null +++ b/lua/plugins/blink.lua @@ -0,0 +1,64 @@ +-- Performant, batteries-included completion plugin for Neovim +return { + 'saghen/blink.cmp', + enabled = true, + lazy = false, + -- optional: provides snippets for the snippet source + dependencies = { 'rafamadriz/friendly-snippets' }, + + -- use a release tag to download pre-built binaries + version = '1.*', + -- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust + -- build = 'cargo build --release', + -- If you use nix, you can build from source using latest nightly rust with: + -- build = 'nix run .#build-plugin', + + ---@module 'blink.cmp' + ---@type blink.cmp.Config + opts = { + -- 'default' (recommended) for mappings similar to built-in completions (C-y to accept) + -- 'super-tab' for mappings similar to vscode (tab to accept) + -- 'enter' for enter to accept + -- 'none' for no mappings + -- + -- All presets have the following mappings: + -- C-space: Open menu or open docs if already open + -- C-n/C-p or Up/Down: Select next/previous item + -- C-e: Hide menu + -- C-k: Toggle signature help (if signature.enabled = true) + -- + -- See :h blink-cmp-config-keymap for defining your own keymap + keymap = { preset = 'default' }, + + appearance = { + -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' + -- Adjusts spacing to ensure icons are aligned + nerd_font_variant = 'mono' + }, + + -- (Default) Only show the documentation popup when manually triggered + completion = { documentation = { auto_show = false } }, + + -- Default list of enabled providers defined so that you can extend it + -- elsewhere in your config, without redefining it, due to `opts_extend` + sources = { + default = { 'lazydev', 'lsp', 'path', 'snippets', 'buffer' }, + providers = { + lazydev = { + name = 'LazyDev', + module = 'lazydev.integrations.blink', + -- make lazydev completions top priority (see `:h blink.cmp`) + score_offset = 100, + }, + } + }, + + -- (Default) Rust fuzzy matcher for typo resistance and significantly better performance + -- You may use a lua implementation instead by using `implementation = 'lua'` or fallback to the lua implementation, + -- when the Rust fuzzy matcher is not available, by using `implementation = 'prefer_rust'` + -- + -- See the fuzzy documentation for more information + fuzzy = { implementation = 'prefer_rust_with_warning' } + }, + opts_extend = { 'sources.default' } +} diff --git a/lua/plugins/bufferline.lua b/lua/plugins/bufferline.lua index 9d10975..840f131 100644 --- a/lua/plugins/bufferline.lua +++ b/lua/plugins/bufferline.lua @@ -1,72 +1,72 @@ -- A snazzy 💅 buffer line (with tabpage integration) for Neovim built using lua return { - 'akinsho/bufferline.nvim', + 'akinsho/bufferline.nvim', enabled = true, lazy = true, event = 'BufReadPre', keys = { - { '', 'BufferLineCycleNext', mode = { 'n' }, desc = 'Move to the next tab', noremap = true, silent = true }, - { '', 'BufferLineCyclePrev', mode = { 'n' }, desc = 'Move to the previous tab', noremap = true, silent = true }, - { '', 'lua require("bufferline").go_to(vim.fn.input("Enter tab number: "), true)', mode = { 'n' }, desc = 'Move to the tab', noremap = true, silent = true }, + { '', 'BufferLineCycleNext', mode = { 'n' }, desc = 'Move to the next tab', noremap = true, silent = true }, + { '', 'BufferLineCyclePrev', mode = { 'n' }, desc = 'Move to the previous tab', noremap = true, silent = true }, + { '', 'lua require("bufferline").go_to(vim.fn.input("Enter tab number: "), true)', mode = { 'n' }, desc = 'Move to the tab', noremap = true, silent = true }, }, - version = '*', + version = '*', dependencies = { - -- - { 'nvim-tree/nvim-web-devicons' } + -- Provides Nerd Font icons (glyphs) for use by neovim plugins + 'nvim-tree/nvim-web-devicons' }, - opts = { - options = { + opts = { + options = { themable = true, - numbers = 'ordinal', - -- close_command = 'bdelete! %d', - -- right_mouse_command = 'bdelete! %d', - -- left_mouse_command = 'buffer %d', - -- middle_mouse_command = nil, - indicator = { - icon = '▎', - style = 'icon', - }, - max_name_length = 24, - max_prefix_length = 18, - truncate_names = true, - tab_size = 18, - diagnostics = 'nvim_lsp', - offsets = { - { - filetype = 'NvimTree', - text = 'File Explorer', - text_align = 'left', - separator = true - } - }, - color_icons = true, - show_buffer_icons = true, - show_buffer_close_icons = true, - show_close_icon = true, - show_tab_indicators = true, - show_duplicate_prefix = true, - duplicates_across_groups = true, - persist_buffer_sort = true, - move_wraps_at_ends = false, - -- separator_style = 'slant' | 'slope' | 'thick' | 'thin' | { 'any', 'any' }, - separator_style = 'default', - enforce_regular_tabs = false, - always_show_bufferline = true, - auto_toggle_bufferline = true, - hover = { - enabled = true, - delay = 200, - reveal = {'close'} - }, - --[[ sort_by = 'insert_after_current' |'insert_at_end' | 'id' | 'extension' | 'relative_directory' | 'directory' | 'tabs' | function(buffer_a, buffer_b) + numbers = 'ordinal', + -- close_command = 'bdelete! %d', + -- right_mouse_command = 'bdelete! %d', + -- left_mouse_command = 'buffer %d', + -- middle_mouse_command = nil, + indicator = { + icon = '▎', + style = 'icon', + }, + max_name_length = 24, + max_prefix_length = 18, + truncate_names = true, + tab_size = 18, + diagnostics = 'nvim_lsp', + offsets = { + { + filetype = 'NvimTree', + text = 'File Explorer', + text_align = 'left', + separator = true + } + }, + color_icons = true, + show_buffer_icons = true, + show_buffer_close_icons = true, + show_close_icon = true, + show_tab_indicators = true, + show_duplicate_prefix = true, + duplicates_across_groups = true, + persist_buffer_sort = true, + move_wraps_at_ends = false, + -- separator_style = 'slant' | 'slope' | 'thick' | 'thin' | { 'any', 'any' }, + separator_style = 'default', + enforce_regular_tabs = false, + always_show_bufferline = true, + auto_toggle_bufferline = true, + hover = { + enabled = true, + delay = 200, + reveal = { 'close' } + }, + --[[ sort_by = 'insert_after_current' |'insert_at_end' | 'id' | 'extension' | 'relative_directory' | 'directory' | 'tabs' | function(buffer_a, buffer_b) local modified_a = vim.fn.getftime(buffer_a.path) local modified_b = vim.fn.getftime(buffer_b.path) return modified_a > modified_b end, ]] - sort_by = 'insert_after_current', - pick = { - alphabet = 'abcdefghijklmopqrstuvwxyzABCDEFGHIJKLMOPQRSTUVWXYZ1234567890', - } + sort_by = 'insert_after_current', + pick = { + alphabet = 'abcdefghijklmopqrstuvwxyzABCDEFGHIJKLMOPQRSTUVWXYZ1234567890', + } + } } - } } diff --git a/lua/plugins/coq.lua b/lua/plugins/coq.lua deleted file mode 100644 index c24a6f7..0000000 --- a/lua/plugins/coq.lua +++ /dev/null @@ -1,23 +0,0 @@ --- Fast as FUCK nvim completion -return { - 'ms-jpq/coq_nvim', - enabled = true, - lazy = false, - priority = 30, - branch = 'coq', - dependencies = { - -- Quickstart configs for Nvim LSP - { 'neovim/nvim-lspconfig' }, - - -- 9000+ Snippets - { 'ms-jpq/coq.artifacts', branch = 'artifacts' }, - - -- Lua & third party sources. Need to **configure separately** - { 'ms-jpq/coq.thirdparty', branch = '3p' } - }, - config = function() - vim.g.coq_settings = { - auto_start = 'shut-up', - } - end, -} diff --git a/lua/plugins/dap-text.lua b/lua/plugins/dap-text.lua index 7a35625..be4cecd 100644 --- a/lua/plugins/dap-text.lua +++ b/lua/plugins/dap-text.lua @@ -4,10 +4,10 @@ return { enabled = true, lazy = true, dependencies = { - -- Debug Adapter Protocol client implementation for Neovim + -- Debug Adapter Protocol client implementation for Neovim { 'mfussenegger/nvim-dap' }, - -- Nvim Treesitter configurations and abstraction layer + -- Nvim Treesitter configurations and abstraction layer { 'nvim-treesitter/nvim-treesitter' } } } diff --git a/lua/plugins/dap-ui.lua b/lua/plugins/dap-ui.lua index 16bb5f9..8fc775a 100644 --- a/lua/plugins/dap-ui.lua +++ b/lua/plugins/dap-ui.lua @@ -1,14 +1,14 @@ --- A UI for nvim-dap -return { - 'rcarriga/nvim-dap-ui', +-- An UI for nvim-dap +return { + 'rcarriga/nvim-dap-ui', enabled = true, lazy = true, dependencies = { - -- Debug Adapter Protocol client implementation for Neovim - 'mfussenegger/nvim-dap', + -- Debug Adapter Protocol client implementation for Neovim + { 'mfussenegger/nvim-dap' }, -- A library for asynchronous IO in Neovim - 'nvim-neotest/nvim-nio' + { 'nvim-neotest/nvim-nio' } }, config = function() local dap, dapui = require('dap'), require('dapui') diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 4c5242e..ad4e8dd 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -1,29 +1,40 @@ --- Debug Adapter Protocol client implementation for Neovim +-- Debug Adapter Protocol client implementation for Neovim return { 'mfussenegger/nvim-dap', enabled = true, lazy = true, + dependencies = { + -- An UI for nvim-dap + { 'rcarriga/nvim-dap-ui' }, + + -- A library for asynchronous IO in Neovim + { 'nvim-neotest/nvim-nio' }, + + -- Virtual text support to nvim-dap + { 'theHamsta/nvim-dap-virtual-text' } + }, config = function() - local dap = require('dap') + local dap = require('dap') + require('telescope').load_extension('dap') - -- Installing debuggers for C, Rust and C++ - dap.configurations.cpp = {} + -- Installing debuggers for C, Rust and C++ + dap.configurations.cpp = {} - -- Initializing PHP debugger adapter - dap.adapters.php = { - type = 'executable', - command = 'node', - args = { os.getenv('HOME') .. '/vscode-php-debug/out/phpDebug.js' } + -- Initializing PHP debugger adapter + dap.adapters.php = { + type = 'executable', + command = 'node', + args = { os.getenv('HOME') .. '/vscode-php-debug/out/phpDebug.js' } + } + + -- Installing PHP debugger + dap.configurations.php = { + { + type = 'php', + request = 'launch', + name = 'Listen for Xdebug', + port = 9003 } - - -- Installing PHP debugger - dap.configurations.php = { - { - type = 'php', - request = 'launch', - name = 'Listen for Xdebug', - port = 9003 - } - } - end + } + end } diff --git a/lua/plugins/diaglist.lua b/lua/plugins/diaglist.lua index baad034..0ba0ef0 100644 --- a/lua/plugins/diaglist.lua +++ b/lua/plugins/diaglist.lua @@ -1,4 +1,4 @@ --- Live render workspace diagnostics in quickfix with +-- Live render workspace diagnostics in quickfix with -- current buf errors on top, buffer diagnostics in loclist -- @todo удалить и заменить на трабл return { diff --git a/lua/plugins/disabled/lspconfig-with-coq.lua b/lua/plugins/disabled/lspconfig-with-coq.lua new file mode 100644 index 0000000..e99cf4b --- /dev/null +++ b/lua/plugins/disabled/lspconfig-with-coq.lua @@ -0,0 +1,175 @@ +-- Quickstart configs for Nvim LSP +return { + 'neovim/nvim-lspconfig', + enabled = true, + lazy = false, + priority = 70, + dependencies = { + -- 🌈 Plugin that creates missing LSP diagnostics + -- highlight groups for color schemes that do not + -- yet support the Neovim 0.5 builtin LSP client + { 'folke/lsp-colors.nvim' }, + + -- Fast as FUCK nvim completion + { 'ms-jpq/coq_nvim', branch = 'coq' }, + + -- 9000+ Snippets + { 'ms-jpq/coq.artifacts', branch = 'artifacts' }, + + -- Lua & third party sources. Need to **configure separately** + { 'ms-jpq/coq.thirdparty', branch = '3p' } + }, + init = function() + vim.g.coq_settings = { + auto_start = 'shut-up' + } + end, + config = function() + -- @todo навести порядок + + -- Активация вещания готовых набросков + local capabilities = vim.lsp.protocol.make_client_capabilities() + capabilities.textDocument.completion.completionItem.snippetSupport = true + + -- Инициализация 'ms-jpq/coq_nvim' + local coq = require('coq') + + -- Инициализация LSP-серверов + + -- Инициализация 'bmewburn/vscode-intelephense' (LSP-сервер для PHP) + vim.lsp.config( + 'intelephense', + { + on_attach = lspconfig_on_attach, + coq.lsp_ensure_capabilities(), + capabilities = capabilities + } + ) + vim.lsp.enable('intelephense') + + -- Инициализация 'hrsh7th/vscode-html-language-server' (LSP-сервер для HTML) + vim.lsp.config( + 'html', + { + init_options = { + configurationSection = { 'html' }, + embeddedLanguages = { + css = false, + javascript = false + }, + provideFormatter = true, + }, + on_attach = lspconfig_on_attach, + coq.lsp_ensure_capabilities(), + capabilities = capabilities + } + ) + vim.lsp.enable('html') + + -- Инициализация 'aca/emmet-ls' (LSP-сервер для HTML) + vim.lsp.config( + 'emmet_ls', + { + init_options = { + html = { + options = { + ['bem.enabled'] = true, + }, + }, + }, + on_attach = lspconfig_on_attach, + coq.lsp_ensure_capabilities(), + capabilities = capabilities + }) + vim.lsp.enable('emmet_ls') + + -- Инициализация 'hrsh7th/vscode-langservers-extracted' (LSP-сервер для CSS) + vim.lsp.config( + 'cssls', + { + settings = { + css = { + validate = true + }, + less = { + validate = true + }, + scss = { + validate = true + } + }, + on_attach = lspconfig_on_attach, + coq.lsp_ensure_capabilities(), + capabilities = capabilities + }) + vim.lsp.enable('cssls') + + -- Инициализация 'antonk52/cssmodules-language-server' (LSP-сервер для JS, вспомогательный для CSS) + vim.lsp.config( + 'cssmodules_ls', + { + init_options = { + camelCase = false, + }, + on_attach = lspconfig_on_attach, + coq.lsp_ensure_capabilities(), + capabilities = capabilities + }) + vim.lsp.enable('cssmodules_ls') + + -- Инициализация 'denoland/deno' (LSP-сервер для JavaScript и PostScript) + vim.lsp.config( + 'denols', + { + init_options = { + enable = true, + unstable = false + }, + on_attach = lspconfig_on_attach, + coq.lsp_ensure_capabilities(), + capabilities = capabilities + }) + vim.lsp.enable('denols') + + -- Инициализация 'hrsh7th/vscode-langservers-extracted' (LSP-сервер для JSON) + vim.lsp.config( + 'jsonls', + { + on_attach = lspconfig_on_attach, + coq.lsp_ensure_capabilities(), + capabilities = capabilities + }) + vim.lsp.enable('jsonls') + + -- Инициализация 'luals/lua-language-server' (LSP-сервер для Lua) + vim.lsp.config( + 'lua_ls', + { + settings = { + Lua = { + runtime = { + -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) + version = 'LuaJIT', + }, + diagnostics = { + -- Get the language server to recognize the `vim` global + globals = { 'vim' }, + }, + workspace = { + -- Make the server aware of Neovim runtime files + library = vim.api.nvim_get_runtime_file('', true), + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { + enable = false, + }, + }, + }, + on_attach = lspconfig_on_attach, + coq.lsp_ensure_capabilities(), + capabilities = capabilities + } + ) + vim.lsp.enable('lua_ls') + end, +} diff --git a/lua/plugins/flexoki.lua b/lua/plugins/flexoki.lua index 97c0352..1386045 100644 --- a/lua/plugins/flexoki.lua +++ b/lua/plugins/flexoki.lua @@ -8,74 +8,74 @@ return { name = 'flexoki', opts = { variant = 'auto', -- auto, moon, or dawn - dim_inactive_windows = false, - extend_background_behind_borders = true, + dim_inactive_windows = false, + extend_background_behind_borders = true, - enable = { - terminal = true, - }, + enable = { + terminal = true, + }, - styles = { - bold = true, - italic = false, - }, + styles = { + bold = true, + italic = false, + }, - groups = { - border = 'muted', - link = 'purple_two', - panel = 'surface', + groups = { + border = 'muted', + link = 'purple_two', + panel = 'surface', - error = 'red_one', - hint = 'purple_one', - info = 'cyan_one', - ok = 'green_one', - warn = 'orange_one', - note = 'blue_one', - todo = 'magenta_one', + error = 'red_one', + hint = 'purple_one', + info = 'cyan_one', + ok = 'green_one', + warn = 'orange_one', + note = 'blue_one', + todo = 'magenta_one', - git_add = 'green_one', - git_change = 'yellow_one', - git_delete = 'red_one', - git_dirty = 'yellow_one', - git_ignore = 'muted', - git_merge = 'purple_one', - git_rename = 'blue_one', - git_stage = 'purple_one', - git_text = 'magenta_one', - git_untracked = 'subtle', + git_add = 'green_one', + git_change = 'yellow_one', + git_delete = 'red_one', + git_dirty = 'yellow_one', + git_ignore = 'muted', + git_merge = 'purple_one', + git_rename = 'blue_one', + git_stage = 'purple_one', + git_text = 'magenta_one', + git_untracked = 'subtle', - h1 = 'purple_two', - h2 = 'cyan_two', - h3 = 'magenta_two', - h4 = 'orange_two', - h5 = 'blue_two', - h6 = 'cyan_two', - }, + h1 = 'purple_two', + h2 = 'cyan_two', + h3 = 'magenta_two', + h4 = 'orange_two', + h5 = 'blue_two', + h6 = 'cyan_two', + }, - palette = { - -- Override the builtin palette per variant - -- moon = { - -- base = '#100f0f', - -- overlay = '#1c1b1a', - -- }, - }, + palette = { + -- Override the builtin palette per variant + -- moon = { + -- base = '#100f0f', + -- overlay = '#1c1b1a', + -- }, + }, - highlight_groups = { - -- Comment = { fg = 'subtle' }, - -- VertSplit = { fg = 'muted', bg = 'muted' }, - }, + highlight_groups = { + -- Comment = { fg = 'subtle' }, + -- VertSplit = { fg = 'muted', bg = 'muted' }, + }, - before_highlight = function(group, highlight, palette) - -- Disable all undercurls - -- if highlight.undercurl then - -- highlight.undercurl = false - -- end - -- - -- Change palette colour - -- if highlight.fg == palette.blue_two then - -- highlight.fg = palette.cyan_two - -- end - end, + before_highlight = function(group, highlight, palette) + -- Disable all undercurls + -- if highlight.undercurl then + -- highlight.undercurl = false + -- end + -- + -- Change palette colour + -- if highlight.fg == palette.blue_two then + -- highlight.fg = palette.cyan_two + -- end + end, }, config = function() -- Activating diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index ac8f293..328c613 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -5,45 +5,45 @@ return { enabled = true, lazy = true, opts = { - on_attach = gitsigns_on_attach, - signs = { - add = { text = '│' }, - change = { text = '│' }, - delete = { text = '_' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, - untracked = { text = '┆' }, - }, - signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` - numhl = false, -- Toggle with `:Gitsigns toggle_numhl` - linehl = false, -- Toggle with `:Gitsigns toggle_linehl` - word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` - watch_gitdir = { - interval = 1000, - follow_files = true - }, - attach_to_untracked = true, - current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` - current_line_blame_opts = { - virt_text = true, - virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' - delay = 1000, - ignore_whitespace = false, - }, - current_line_blame_formatter = ', - ', - sign_priority = 6, - update_debounce = 100, - status_formatter = nil, -- Use default - max_file_length = 40000, -- Disable if file is longer than this (in lines) - preview_config = { - -- Options passed to nvim_open_win - border = 'single', - style = 'minimal', - relative = 'cursor', - row = 0, - col = 1 - }, - --[[ yadm = { + on_attach = gitsigns_on_attach, + signs = { + add = { text = '│' }, + change = { text = '│' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + untracked = { text = '┆' }, + }, + signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` + numhl = false, -- Toggle with `:Gitsigns toggle_numhl` + linehl = false, -- Toggle with `:Gitsigns toggle_linehl` + word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` + watch_gitdir = { + interval = 1000, + follow_files = true + }, + attach_to_untracked = true, + current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` + current_line_blame_opts = { + virt_text = true, + virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' + delay = 1000, + ignore_whitespace = false, + }, + current_line_blame_formatter = ', - ', + sign_priority = 6, + update_debounce = 100, + status_formatter = nil, -- Use default + max_file_length = 40000, -- Disable if file is longer than this (in lines) + preview_config = { + -- Options passed to nvim_open_win + border = 'single', + style = 'minimal', + relative = 'cursor', + row = 0, + col = 1 + }, + --[[ yadm = { enable = false }, ]] diff --git a/lua/plugins/kommentary.lua b/lua/plugins/kommentary.lua index 8f59223..7e4315c 100644 --- a/lua/plugins/kommentary.lua +++ b/lua/plugins/kommentary.lua @@ -4,9 +4,9 @@ return { enabled = true, lazy = true, keys = { - { 'gcc', 'kommentary_line_default', mode = 'n', desc = 'Comment', noremap = true, silent = true }, - { 'gc', 'kommentary_motion_default', mode = 'n', desc = 'Comment', noremap = true, silent = true }, - { 'gc', 'kommentary_visual_default', mode = 'v', desc = 'Comment', noremap = true, silent = true }, + { 'gcc', 'kommentary_line_default', mode = 'n', desc = 'Comment', noremap = true, silent = true }, + { 'gc', 'kommentary_motion_default', mode = 'n', desc = 'Comment', noremap = true, silent = true }, + { 'gc', 'kommentary_visual_default', mode = 'v', desc = 'Comment', noremap = true, silent = true }, }, config = function() vim.g.kommentary_create_default_mappings = false diff --git a/lua/plugins/lazydev.lua b/lua/plugins/lazydev.lua new file mode 100644 index 0000000..af6bfd3 --- /dev/null +++ b/lua/plugins/lazydev.lua @@ -0,0 +1,13 @@ +-- Faster LuaLS setup for Neovim +return { + 'folke/lazydev.nvim', + enabled = true, + lazy = false, + ft = 'lua', + opts = { + library = { + -- Load luvit types when the `vim.uv` word is found + { path = '${3rd}/luv/library', words = { 'vim%.uv' } }, + }, + } +} diff --git a/lua/plugins/lint.lua b/lua/plugins/lint.lua index 31e392c..49fa1b6 100644 --- a/lua/plugins/lint.lua +++ b/lua/plugins/lint.lua @@ -1,5 +1,5 @@ --- An asynchronous linter plugin for Neovim complementary --- to the built-in Language Server Protocol support. +-- An asynchronous linter plugin for Neovim complementary +-- to the built-in Language Server Protocol support. return { 'mfussenegger/nvim-lint', enabled = true, diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index ad5766c..b55b49a 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -1,167 +1,156 @@ -- Quickstart configs for Nvim LSP return { - 'neovim/nvim-lspconfig', + 'neovim/nvim-lspconfig', enabled = true, - lazy = false, + lazy = false, priority = 70, - dependencies = { - -- 🌈 Plugin that creates missing LSP diagnostics - -- highlight groups for color schemes that do not + dependencies = { + -- 🌈 Plugin that creates missing LSP diagnostics + -- highlight groups for color schemes that do not -- yet support the Neovim 0.5 builtin LSP client - { 'folke/lsp-colors.nvim' }, + { 'folke/lsp-colors.nvim' }, - -- 9000+ Snippets - { 'ms-jpq/coq.artifacts', branch = 'artifacts' }, + -- A completion plugin for neovim coded in Lua. + { 'hrsh7th/nvim-cmp' }, - -- Lua & third party sources. Need to **configure separately** - { 'ms-jpq/coq.thirdparty', branch = '3p' } - }, - config = function() - -- @todo навести порядок + -- 💫 Extensible UI for Neovim notifications and LSP progress messages + { 'j-hui/fidget.nvim' } + }, + init = function() + end, + config = function() + -- @todo навести порядок --- Активация вещания готовых набросков -local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities.textDocument.completion.completionItem.snippetSupport = true + -- Активация вещания готовых набросков + local capabilities = require('cmp_nvim_lsp').default_capabilities() + -- Инициализация LSP-серверов --- Инициализация 'ms-jpq/coq_nvim' -local coq = require('coq') + -- Инициализация 'bmewburn/vscode-intelephense' (LSP-сервер для PHP) + vim.lsp.config( + 'intelephense', + { + on_attach = lspconfig_on_attach, + capabilities = capabilities + } + ) + vim.lsp.enable('intelephense') --- Инициализация LSP-серверов + -- Инициализация 'hrsh7th/vscode-html-language-server' (LSP-сервер для HTML) + vim.lsp.config( + 'html', + { + init_options = { + configurationSection = { 'html' }, + embeddedLanguages = { + css = false, + javascript = false + }, + provideFormatter = true, + }, + on_attach = lspconfig_on_attach, + capabilities = capabilities + } + ) + vim.lsp.enable('html') --- Инициализация 'bmewburn/vscode-intelephense' (LSP-сервер для PHP) -vim.lsp.config( - 'intelephense', - { - on_attach = lspconfig_on_attach, - coq.lsp_ensure_capabilities(), - capabilities = capabilities - } -) -vim.lsp.enable('intelephense') + -- Инициализация 'aca/emmet-ls' (LSP-сервер для HTML) + vim.lsp.config( + 'emmet_ls', + { + init_options = { + html = { + options = { + ['bem.enabled'] = true, + }, + }, + }, + on_attach = lspconfig_on_attach, + capabilities = capabilities + }) + vim.lsp.enable('emmet_ls') --- Инициализация 'hrsh7th/vscode-html-language-server' (LSP-сервер для HTML) -vim.lsp.config( - 'html', - { - init_options = { - configurationSection = { 'html' }, - embeddedLanguages = { - css = false, - javascript = false - }, - provideFormatter = true, - }, - on_attach = lspconfig_on_attach, - coq.lsp_ensure_capabilities(), - capabilities = capabilities -} -) -vim.lsp.enable('html') - --- Инициализация 'aca/emmet-ls' (LSP-сервер для HTML) -vim.lsp.config( - 'emmet_ls', - { - init_options = { - html = { - options = { - ['bem.enabled'] = true, - }, - }, - }, - on_attach = lspconfig_on_attach, - coq.lsp_ensure_capabilities(), - capabilities = capabilities -}) -vim.lsp.enable('emmet_ls') - --- Инициализация 'hrsh7th/vscode-langservers-extracted' (LSP-сервер для CSS) -vim.lsp.config( - 'cssls', - { - settings = { - css = { - validate = true - }, - less = { - validate = true - }, - scss = { - validate = true - } - }, - on_attach = lspconfig_on_attach, - coq.lsp_ensure_capabilities(), - capabilities = capabilities -}) -vim.lsp.enable('cssls') - --- Инициализация 'antonk52/cssmodules-language-server' (LSP-сервер для JS, вспомогательный для CSS) -vim.lsp.config( - 'cssmodules_ls', - { - init_options = { - camelCase = false, - }, - on_attach = lspconfig_on_attach, - coq.lsp_ensure_capabilities(), - capabilities = capabilities -}) -vim.lsp.enable('cssmodules_ls') - --- Инициализация 'denoland/deno' (LSP-сервер для JavaScript и PostScript) -vim.lsp.config( - 'denols', - { - init_options = { - enable = true, - unstable = false - }, - on_attach = lspconfig_on_attach, - coq.lsp_ensure_capabilities(), - capabilities = capabilities -}) -vim.lsp.enable('denols') - --- Инициализация 'hrsh7th/vscode-langservers-extracted' (LSP-сервер для JSON) -vim.lsp.config( - 'jsonls', - { - on_attach = lspconfig_on_attach, - coq.lsp_ensure_capabilities(), - capabilities = capabilities -}) -vim.lsp.enable('jsonls') - --- Инициализация 'luals/lua-language-server' (LSP-сервер для Lua) - vim.lsp.config( - 'lua_ls', - { - settings = { - Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) - version = 'LuaJIT', - }, - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = { 'vim' }, - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file('', true), - }, - -- Do not send telemetry data containing a randomized but unique identifier - telemetry = { - enable = false, - }, - }, - }, - on_attach = lspconfig_on_attach, - coq.lsp_ensure_capabilities(), - capabilities = capabilities -} -) -vim.lsp.enable('lua_ls') - end, + -- Инициализация 'hrsh7th/vscode-langservers-extracted' (LSP-сервер для CSS) + vim.lsp.config( + 'cssls', + { + settings = { + css = { + validate = true + }, + less = { + validate = true + }, + scss = { + validate = true + } + }, + on_attach = lspconfig_on_attach, + capabilities = capabilities + }) + vim.lsp.enable('cssls') + + -- Инициализация 'antonk52/cssmodules-language-server' (LSP-сервер для JS, вспомогательный для CSS) + vim.lsp.config( + 'cssmodules_ls', + { + init_options = { + camelCase = false, + }, + on_attach = lspconfig_on_attach, + capabilities = capabilities + }) + vim.lsp.enable('cssmodules_ls') + + -- Инициализация 'denoland/deno' (LSP-сервер для JavaScript и PostScript) + vim.lsp.config( + 'denols', + { + init_options = { + enable = true, + unstable = false + }, + on_attach = lspconfig_on_attach, + capabilities = capabilities + }) + vim.lsp.enable('denols') + + -- Инициализация 'hrsh7th/vscode-langservers-extracted' (LSP-сервер для JSON) + vim.lsp.config( + 'jsonls', + { + on_attach = lspconfig_on_attach, + capabilities = capabilities + }) + vim.lsp.enable('jsonls') + + -- Инициализация 'luals/lua-language-server' (LSP-сервер для Lua) + vim.lsp.config( + 'lua_ls', + { + settings = { + Lua = { + runtime = { + -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) + version = 'LuaJIT', + }, + diagnostics = { + -- Get the language server to recognize the `vim` global + globals = { 'vim' }, + }, + workspace = { + -- Make the server aware of Neovim runtime files + library = vim.api.nvim_get_runtime_file('', true), + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { + enable = false, + }, + }, + }, + on_attach = lspconfig_on_attach, + capabilities = capabilities + } + ) + vim.lsp.enable('lua_ls') + end, } diff --git a/lua/plugins/lspkind.lua b/lua/plugins/lspkind.lua index 3330cf8..59518da 100644 --- a/lua/plugins/lspkind.lua +++ b/lua/plugins/lspkind.lua @@ -1,10 +1,10 @@ --- VSCode–style pictograms for Neovim completion items +-- VSCode–style pictograms for Neovim completion items return { 'onsails/lspkind-nvim', enabled = true, lazy = true, opts = { - mode = 'symbol', - preset = 'default', + mode = 'symbol', + preset = 'default', } } diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 3fc4b20..78b5385 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -1,113 +1,113 @@ -- stylua: ignore local colors = { - blue = '#80a0ff', - cyan = '#79dac8', - black = '#080808', - white = '#c6c6c6', - red = '#ff5189', - violet = '#d183e8', - grey = '#303030', + blue = '#80a0ff', + cyan = '#79dac8', + black = '#080808', + white = '#c6c6c6', + red = '#ff5189', + violet = '#d183e8', + grey = '#303030', } local bubbles_theme = { - normal = { - a = { fg = colors.black, bg = colors.violet }, - b = { fg = colors.white, bg = colors.grey }, - c = { fg = colors.white }, - }, + normal = { + a = { fg = colors.black, bg = colors.violet }, + b = { fg = colors.white, bg = colors.grey }, + c = { fg = colors.white }, + }, - insert = { a = { fg = colors.black, bg = colors.blue } }, - visual = { a = { fg = colors.black, bg = colors.cyan } }, - replace = { a = { fg = colors.black, bg = colors.red } }, + insert = { a = { fg = colors.black, bg = colors.blue } }, + visual = { a = { fg = colors.black, bg = colors.cyan } }, + replace = { a = { fg = colors.black, bg = colors.red } }, - inactive = { - a = { fg = colors.white, bg = colors.black }, - b = { fg = colors.white, bg = colors.black }, - c = { fg = colors.white }, - }, + inactive = { + a = { fg = colors.white, bg = colors.black }, + b = { fg = colors.white, bg = colors.black }, + c = { fg = colors.white }, + }, } --- A blazing fast and easy to configure +-- A blazing fast and easy to configure -- neovim statusline plugin written in pure lua -- @todo навести порядок return { - 'nvim-lualine/lualine.nvim', - enabled = true, - lazy = false, - priority = 80, - dependencies = { - -- Provides Nerd Font icons (glyphs) for use by neovim plugins - { 'nvim-tree/nvim-web-devicons' }, + 'nvim-lualine/lualine.nvim', + enabled = true, + lazy = false, + priority = 80, + dependencies = { + -- Provides Nerd Font icons (glyphs) for use by neovim plugins + { 'nvim-tree/nvim-web-devicons' }, - -- LSP Progress lualine componenet - { 'arkav/lualine-lsp-progress' }, + -- LSP Progress lualine componenet + { 'arkav/lualine-lsp-progress' }, - -- A Git wrapper so awesome, it should be illegal - { 'tpope/vim-fugitive' } - }, - config = function() - require('lualine').setup { - options = { - icons_enabled = true, - theme = 'auto', - component_separators = { left = '', right = ''}, - section_separators = { left = '', right = ''}, - disabled_filetypes = { - statusline = {}, - winbar = {}, - }, - ignore_focus = {}, - always_divide_middle = true, - always_show_tabline = true, - globalstatus = true, - refresh = { - statusline = 1000, - tabline = 1000, - winbar = 1000, - refresh_time = 16, -- ~60fps - events = { - 'WinEnter', - 'BufEnter', - 'BufWritePost', - 'SessionLoadPost', - 'FileChangedShellPost', - 'VimResized', - 'Filetype', - 'CursorMoved', - 'CursorMovedI', - 'ModeChanged', - }, - } - }, - sections = { - lualine_a = {'mode'}, - lualine_b = {'branch', 'diff'}, - lualine_c = {'filename', 'lsp_progress'}, - lualine_x = { 'encoding', 'fileformat', 'filetype'}, - -- lualine_x = { FugitiveStatusline, 'encoding', 'fileformat', 'filetype'}, - -- lualine_x = { FugitiveHead, 'encoding', 'fileformat', 'filetype'}, - lualine_y = {'progress'}, - lualine_z = {'location'} - }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - lualine_c = {'filename'}, - lualine_x = {'location'}, - lualine_y = {}, - lualine_z = {} - }, - tabline = {}, - winbar = {}, - inactive_winbar = {}, - extensions = { - 'lazy', - 'nvim-dap-ui', - 'trouble', - 'neo-tree' - } - } - --[[ config = function() + -- A Git wrapper so awesome, it should be illegal + { 'tpope/vim-fugitive' } + }, + config = function() + require('lualine').setup { + options = { + icons_enabled = true, + theme = 'auto', + component_separators = { left = '', right = '' }, + section_separators = { left = '', right = '' }, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + always_show_tabline = true, + globalstatus = true, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + refresh_time = 16, -- ~60fps + events = { + 'WinEnter', + 'BufEnter', + 'BufWritePost', + 'SessionLoadPost', + 'FileChangedShellPost', + 'VimResized', + 'Filetype', + 'CursorMoved', + 'CursorMovedI', + 'ModeChanged', + }, + } + }, + sections = { + lualine_a = { 'mode' }, + lualine_b = { 'branch', 'diff' }, + lualine_c = { 'filename', 'lsp_progress' }, + lualine_x = { 'encoding', 'fileformat', 'filetype' }, + -- lualine_x = { FugitiveStatusline, 'encoding', 'fileformat', 'filetype'}, + -- lualine_x = { FugitiveHead, 'encoding', 'fileformat', 'filetype'}, + lualine_y = { 'progress' }, + lualine_z = { 'location' } + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { 'filename' }, + lualine_x = { 'location' }, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = { + 'lazy', + 'nvim-dap-ui', + 'trouble', + 'neo-tree' + } + } + --[[ config = function() local trouble = require("trouble") local symbols = trouble.statusline({ mode = "lsp_document_symbols", @@ -124,5 +124,5 @@ return { cond = symbols.has, }) end ]] - end + end } diff --git a/lua/plugins/lush.lua b/lua/plugins/lush.lua index 8428c46..7bc9089 100644 --- a/lua/plugins/lush.lua +++ b/lua/plugins/lush.lua @@ -1,9 +1,9 @@ -- Create Neovim themes with real-time feedback, export anywhere return { - 'rktjmp/lush.nvim', + 'rktjmp/lush.nvim', enabled = true, lazy = false, priority = 100, - -- if you wish to use your own colorscheme: - -- { dir = '/absolute/path/to/colorscheme', lazy = true }, + -- if you wish to use your own colorscheme: + -- { dir = '/absolute/path/to/colorscheme', lazy = true }, } diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index 4bb6c77..8b7cd32 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -7,17 +7,17 @@ return { keys = { { '', 'Neotree toggle', mode = { 'n', 'i', 'v', 't' }, desc = 'NeoTree toggle', noremap = true, silent = true }, }, - branch = 'v3.x', - dependencies = { - -- Lua functions + branch = 'v3.x', + dependencies = { + -- Lua functions { 'nvim-lua/plenary.nvim' }, - - -- Provides Nerd Font icons (glyphs) for use by neovim plugins - { 'nvim-tree/nvim-web-devicons' }, - - -- UI Component Library for Neovim + + -- Provides Nerd Font icons (glyphs) for use by neovim plugins + { 'nvim-tree/nvim-web-devicons' }, + + -- UI Component Library for Neovim { 'MunifTanjim/nui.nvim' }, - }, + }, opts = { close_if_last_window = true, clipboard = { diff --git a/lua/plugins/nvim-cmp-git.lua b/lua/plugins/nvim-cmp-git.lua new file mode 100644 index 0000000..c5f134e --- /dev/null +++ b/lua/plugins/nvim-cmp-git.lua @@ -0,0 +1,15 @@ +-- Git source for nvim-cmp +return { + 'petertriho/cmp-git', + enabled = true, + lazy = true, + dependencies = { + -- A completion plugin for neovim coded in Lua. + { 'hrsh7th/nvim-cmp' } + }, + opts = { + }, + init = function() + table.insert(require('cmp').get_config().sources, { name = 'git' }) + end +} diff --git a/lua/plugins/nvim-cmp-lsp.lua b/lua/plugins/nvim-cmp-lsp.lua new file mode 100644 index 0000000..786a6c1 --- /dev/null +++ b/lua/plugins/nvim-cmp-lsp.lua @@ -0,0 +1,14 @@ +-- A completion plugin for neovim coded in Lua. +return { + 'hrsh7th/cmp-nvim-lsp', + enabled = true, + lazy = true, + dependencies = { + -- A completion plugin for neovim coded in Lua. + { 'hrsh7th/nvim-cmp' } + }, + opts = { + }, + init = function() + end +} diff --git a/lua/plugins/nvim-cmp.lua b/lua/plugins/nvim-cmp.lua new file mode 100644 index 0000000..db1f8cf --- /dev/null +++ b/lua/plugins/nvim-cmp.lua @@ -0,0 +1,29 @@ +-- A completion plugin for neovim coded in Lua. +return { + 'hrsh7th/nvim-cmp', + enabled = true, + lazy = true, + dependencies = { + -- nvim-cmp source for neovim builtin LSP client + { 'hrsh7th/cmp-nvim-lsp' }, + + -- Git source for nvim-cmp + { 'petertriho/cmp-git' }, + }, + opts = function(_, opts) + opts.sources = opts.sources or {} + + table.insert(opts.sources, { + name = 'lazydev', + group_index = 0, -- set group index to 0 to skip loading LuaLS completions + }) + + table.insert(opts.sources, { + name = 'nvim_lsp' + }) + + table.insert(opts.sources, { + name = 'git' + }) + end, +} diff --git a/lua/plugins/reticle.lua b/lua/plugins/reticle.lua index 3f4c9ef..862ddb4 100644 --- a/lua/plugins/reticle.lua +++ b/lua/plugins/reticle.lua @@ -1,76 +1,76 @@ --- Highlight only the screen line of the cursor +-- Highlight only the screen line of the cursor -- in the currently active window return { - 'tummetott/reticle.nvim', + 'tummetott/reticle.nvim', enabled = true, lazy = true, - event = 'VeryLazy', + event = 'VeryLazy', opts = { -- Enable/Disable the cursorline and/or cursorcolumn at startup - on_startup = { - cursorline = true, - cursorcolumn = false, - }, + on_startup = { + cursorline = true, + cursorcolumn = false, + }, - -- Disable the cursorline and cursorcolumn in insert mode + -- Disable the cursorline and cursorcolumn in insert mode disable_in_insert = false, - -- Disable the cursorline and cursorcolumn in diff mode - disable_in_diff = false, + -- Disable the cursorline and cursorcolumn in diff mode + disable_in_diff = false, - -- By default, nvim highlights the cursorline number only when the - -- cursorline setting is active. Enabling this setting ensures that the - -- cursorline number in every window is always highlighted, regardless of - -- the cursorline setting. See: ':h cursorlineopt' - always_highlight_number = false, + -- By default, nvim highlights the cursorline number only when the + -- cursorline setting is active. Enabling this setting ensures that the + -- cursorline number in every window is always highlighted, regardless of + -- the cursorline setting. See: ':h cursorlineopt' + always_highlight_number = false, - -- Cursorline and/or cursorcolumn are set to be displayed exclusively in - -- the active window, thus following your active window. This setting is - -- overruled by the following settings concerning special filetypes. - follow = { - cursorline = true, - cursorcolumn = true, - }, + -- Cursorline and/or cursorcolumn are set to be displayed exclusively in + -- the active window, thus following your active window. This setting is + -- overruled by the following settings concerning special filetypes. + follow = { + cursorline = true, + cursorcolumn = true, + }, - -- Specify filetypes where the cursorline and/or cursorcolumn are always - -- enabled, regardless of the global setting. - always = { - cursorline = {}, - cursorcolumn = {}, - }, + -- Specify filetypes where the cursorline and/or cursorcolumn are always + -- enabled, regardless of the global setting. + always = { + cursorline = {}, + cursorcolumn = {}, + }, - -- Specify filetypes where the cursorline and/or cursorcolumn are always - -- enabled when the window is focused, regardless of the global setting. - on_focus = { - cursorline = {}, - cursorcolumn = {}, - }, + -- Specify filetypes where the cursorline and/or cursorcolumn are always + -- enabled when the window is focused, regardless of the global setting. + on_focus = { + cursorline = {}, + cursorcolumn = {}, + }, - -- Define filetypes which are ignored by the plugin - ignore = { - cursorline = { - 'DressingInput', - 'FTerm', - 'NvimSeparator', - 'NvimTree', - 'neo-tree', - 'TelescopePrompt', - 'Trouble', - }, - cursorcolumn = { - 'neo-tree', - }, - }, + -- Define filetypes which are ignored by the plugin + ignore = { + cursorline = { + 'DressingInput', + 'FTerm', + 'NvimSeparator', + 'NvimTree', + 'neo-tree', + 'TelescopePrompt', + 'Trouble', + }, + cursorcolumn = { + 'neo-tree', + }, + }, - -- Specify filetypes where the cursorline and/or cursorcolumn should be - -- explicitly disabled. Typically, you would include these filetypes in - -- the 'ignored' table. However, there are situations where plugins enable - -- cursorline/cursorcolumn without offering a configuration option for - -- disabling them. By adding these filetypes to the 'never' table, you - -- can override the plugin's settings and turn off these features. - never = { - cursorline = {}, - cursorcolumn = {}, - } + -- Specify filetypes where the cursorline and/or cursorcolumn should be + -- explicitly disabled. Typically, you would include these filetypes in + -- the 'ignored' table. However, there are situations where plugins enable + -- cursorline/cursorcolumn without offering a configuration option for + -- disabling them. By adding these filetypes to the 'never' table, you + -- can override the plugin's settings and turn off these features. + never = { + cursorline = {}, + cursorcolumn = {}, + } } } diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index b641df3..f863968 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -5,16 +5,16 @@ return { enabled = true, lazy = true, keys = { - { '', 'Telescope find_files', mode = { 'n', 'i', 'v', 't' }, desc = 'Search files', noremap = true, silent = true }, - { '', 'Telescope live_grep', mode = { 'n', 'i', 'v', 't' }, desc = 'Grep files', noremap = true, silent = true }, - { '', 'Telescope buffers', mode = { 'n', 'v', 't' }, desc = 'Search buffers', noremap = true, silent = true }, - { '?', 'Telescope help_tags', mode = { 'n', 'v', 't' }, desc = 'Help', noremap = true, silent = true }, + { '', 'Telescope find_files', mode = { 'n', 'i', 'v', 't' }, desc = 'Search files', noremap = true, silent = true }, + { '', 'Telescope live_grep', mode = { 'n', 'i', 'v', 't' }, desc = 'Grep files', noremap = true, silent = true }, + { '', 'Telescope buffers', mode = { 'n', 'v', 't' }, desc = 'Search buffers', noremap = true, silent = true }, + { '?', 'Telescope help_tags', mode = { 'n', 'v', 't' }, desc = 'Help', noremap = true, silent = true }, }, dependencies = { -- Functions for Telescope { 'nvim-lua/plenary.nvim' }, - -- Integration for nvim-dap with telescope.nvim + -- Integration for nvim-dap with telescope.nvim { 'nvim-telescope/telescope-dap.nvim' } }, opts = { diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index d4e31ee..05c35c9 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -4,7 +4,7 @@ return { enabled = true, lazy = false, priority = 40, - build = ':TSUpdate', + build = ':TSUpdate', opts = { highlight = { enable = true, diff --git a/lua/plugins/trouble.lua b/lua/plugins/trouble.lua index 15463e8..d87e4a2 100644 --- a/lua/plugins/trouble.lua +++ b/lua/plugins/trouble.lua @@ -1,8 +1,8 @@ --- 🚦 A pretty diagnostics, references, telescope results, --- quickfix and location list to help you solve +-- 🚦 A pretty diagnostics, references, telescope results, +-- quickfix and location list to help you solve -- all the trouble your code is causing -return { - 'folke/trouble.nvim', +return { + 'folke/trouble.nvim', enabled = true, lazy = false, cmd = 'Trouble', @@ -10,10 +10,10 @@ return { { '', 'Trouble diagnostics toggle', mode = { 'n', 'i', 'v', 't' }, desc = 'Diagnostics (Trouble)', noremap = true, silent = true }, }, dependencies = { - -- Nvim Treesitter configurations and abstraction layer + -- Nvim Treesitter configurations and abstraction layer { 'nvim-treesitter/nvim-treesitter' }, - - -- Provides Nerd Font icons (glyphs) for use by neovim plugins + + -- Provides Nerd Font icons (glyphs) for use by neovim plugins { 'nvim-tree/nvim-web-devicons' } } } diff --git a/lua/settings/lazy.lua b/lua/settings/lazy.lua index 168ffad..8020973 100644 --- a/lua/settings/lazy.lua +++ b/lua/settings/lazy.lua @@ -2,20 +2,20 @@ local path = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' if not (vim.uv or vim.loop).fs_stat(path) then - local repository = 'https://github.com/folke/lazy.nvim.git' - local out = vim.fn.system({ 'git', 'clone', '--filter=blob:none', '--branch=stable', repository, path }) + local repository = 'https://github.com/folke/lazy.nvim.git' + local out = vim.fn.system({ 'git', 'clone', '--filter=blob:none', '--branch=stable', repository, path }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { 'Failed to clone lazy.nvim:\n', 'ErrorMsg' }, - { out, 'WarningMsg' }, - { '\nPress any key to exit...' }, - }, true, {}) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { 'Failed to clone lazy.nvim:\n', 'ErrorMsg' }, + { out, 'WarningMsg' }, + { '\nPress any key to exit...' }, + }, true, {}) - vim.fn.getchar() + vim.fn.getchar() - os.exit(1) - end + os.exit(1) + end end vim.opt.rtp:prepend(path) @@ -23,18 +23,18 @@ vim.opt.rtp:prepend(path) -- Setup lazy.nvim require('lazy').setup({ -- Import plugins - spec = { - { import = 'plugins' }, - }, + spec = { + { import = 'plugins' }, + }, - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - -- install = { - -- colorscheme = { 'flexoki' } + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + -- install = { + -- colorscheme = { 'flexoki' } -- }, - -- Automatically check for plugin updates - checker = { - enabled = true + -- Automatically check for plugin updates + checker = { + enabled = true }, }) diff --git a/lua/settings/system.lua b/lua/settings/system.lua index db290c8..d8c0765 100644 --- a/lua/settings/system.lua +++ b/lua/settings/system.lua @@ -48,7 +48,7 @@ vim.opt_local.spelllang = 'ru_yo,en_us' -- Псевдонимы для языков vim.g.markdown_fenced_languages = { - "ts=typescript" + "ts=typescript" } -- Syntax hightlighting diff --git a/lua/trouble.lua b/lua/trouble.lua index 6f3fc9a..b0c3357 100644 --- a/lua/trouble.lua +++ b/lua/trouble.lua @@ -1,8 +1,8 @@ --- 🚦 A pretty diagnostics, references, telescope results, --- quickfix and location list to help you solve +-- 🚦 A pretty diagnostics, references, telescope results, +-- quickfix and location list to help you solve -- all the trouble your code is causing -return { - 'folke/trouble.nvim', +return { + 'folke/trouble.nvim', enabled = true, lazy = false, cmd = 'Trouble', @@ -10,47 +10,46 @@ return { { '', 'Trouble diagnostics toggle', mode = { 'n', 'i', 'v', 't' }, desc = 'Diagnostics (Trouble)', noremap = true, silent = true }, }, dependencies = { - -- Nvim Treesitter configurations and abstraction layer + -- Nvim Treesitter configurations and abstraction layer { 'nvim-treesitter/nvim-treesitter' }, - - -- Provides Nerd Font icons (glyphs) for use by neovim plugins + + -- Provides Nerd Font icons (glyphs) for use by neovim plugins { 'nvim-tree/nvim-web-devicons' } }, - opts = { - - auto_close = true, -- auto close when there are no items - auto_open = true, -- auto open when there are items - position = 'bottom', -- position of the list can be: bottom, top, left, right - auto_preview = true, -- automatically open preview when on an item - auto_refresh = true, -- auto refresh when open - auto_jump = false, -- auto jump to the item when there's only one - focus = false, -- Focus the window when opened - restore = true, -- restores the last location in the list when opening - follow = true, -- Follow the current item - indent_guides = true, -- show indent guides - max_items = 200, -- limit number of items that can be displayed per section - multiline = true, -- render multi-line messages - pinned = false, -- When pinned, the opened trouble window will be bound to the current buffer - warn_no_results = true, -- show a warning when there are no results - open_no_results = false, -- open the trouble window when there are no results - -- use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client + opts = { + auto_close = true, -- auto close when there are no items + auto_open = true, -- auto open when there are items + position = 'bottom', -- position of the list can be: bottom, top, left, right + auto_preview = true, -- automatically open preview when on an item + auto_refresh = true, -- auto refresh when open + auto_jump = false, -- auto jump to the item when there's only one + focus = false, -- Focus the window when opened + restore = true, -- restores the last location in the list when opening + follow = true, -- Follow the current item + indent_guides = true, -- show indent guides + max_items = 200, -- limit number of items that can be displayed per section + multiline = true, -- render multi-line messages + pinned = false, -- When pinned, the opened trouble window will be bound to the current buffer + warn_no_results = true, -- show a warning when there are no results + open_no_results = false, -- open the trouble window when there are no results + -- use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client }, config = function() --- Initializing Telescope -local telescope = require('telescope') -local telescope_actions = require('telescope.actions') -local telescope_open = require('trouble.sources.telescope').open + -- Initializing Telescope + local telescope = require('telescope') + local telescope_actions = require('telescope.actions') + local telescope_open = require('trouble.sources.telescope').open --- Use this to add more results without clearing the trouble list -local add_to_trouble = require('trouble.sources.telescope').add + -- Use this to add more results without clearing the trouble list + local add_to_trouble = require('trouble.sources.telescope').add -telescope.setup({ - defaults = { - mappings = { - i = { [''] = telescope_open }, - n = { [''] = telescope_open }, - }, - }, -}) -end + telescope.setup({ + defaults = { + mappings = { + i = { [''] = telescope_open }, + n = { [''] = telescope_open }, + }, + }, + }) + end }