From 5d29aee4aa6a6e816bd04bf9d23cc7472687edac Mon Sep 17 00:00:00 2001 From: t0xa Date: Sun, 5 Apr 2026 12:50:19 +0300 Subject: [PATCH] Transfering everything for 0.12 --- Dockerfile | 27 + README.md | 72 +-- compiler/mypy.vim | 6 - ftplugin/markdown.lua | 50 -- init.lua | 525 ++++++++++++++++-- lua/custom/README.md | 59 -- lua/custom/colorschemes.lua | 9 - lua/custom/compilers/mypy.lua | 12 - lua/custom/completion.lua | 64 --- lua/custom/fzf_lua.lua | 161 ------ lua/custom/lsp.lua | 235 -------- lua/custom/lualine.lua | 14 - lua/custom/luasnip.lua | 34 -- lua/custom/neogen.lua | 14 - lua/custom/obsidian.lua | 72 --- lua/custom/oil.lua | 27 - lua/custom/plugins/colorschemes.lua | 20 - lua/custom/plugins/completion.lua | 20 - lua/custom/plugins/dressing.lua | 4 - lua/custom/plugins/fzf_lua.lua | 9 - lua/custom/plugins/lsp.lua | 35 -- lua/custom/plugins/lualine.lua | 7 - lua/custom/plugins/luasnip.lua | 9 - lua/custom/plugins/markdown_preview.lua | 11 - lua/custom/plugins/neogen.lua | 12 - lua/custom/plugins/obsidian.lua | 16 - lua/custom/plugins/oil.lua | 8 - lua/custom/plugins/telescope.lua | 13 - lua/custom/plugins/tmux_navigator.lua | 19 - lua/custom/plugins/todo.lua | 8 - lua/custom/plugins/treesitter.lua | 14 - lua/custom/plugins/trouble.lua | 10 - lua/custom/plugins/which_key.lua | 20 - lua/custom/telescope.lua | 133 ----- lua/custom/todo.lua | 12 - lua/custom/treesitter.lua | 16 - lua/custom/trouble.lua | 38 -- main.py | 1 - neovim | 1 + nvim-pack-lock.json | 117 ++++ {lua/custom/snippets => snippets}/README.md | 0 {lua/custom/snippets => snippets}/all.lua | 0 {lua/custom/snippets => snippets}/lua.lua | 0 .../custom/snippets => snippets}/markdown.lua | 0 {lua/custom/snippets => snippets}/python.lua | 0 45 files changed, 639 insertions(+), 1295 deletions(-) create mode 100644 Dockerfile delete mode 100644 compiler/mypy.vim delete mode 100644 lua/custom/README.md delete mode 100644 lua/custom/colorschemes.lua delete mode 100644 lua/custom/compilers/mypy.lua delete mode 100644 lua/custom/completion.lua delete mode 100644 lua/custom/fzf_lua.lua delete mode 100644 lua/custom/lsp.lua delete mode 100644 lua/custom/lualine.lua delete mode 100644 lua/custom/luasnip.lua delete mode 100644 lua/custom/neogen.lua delete mode 100644 lua/custom/obsidian.lua delete mode 100644 lua/custom/oil.lua delete mode 100644 lua/custom/plugins/colorschemes.lua delete mode 100644 lua/custom/plugins/completion.lua delete mode 100644 lua/custom/plugins/dressing.lua delete mode 100644 lua/custom/plugins/fzf_lua.lua delete mode 100644 lua/custom/plugins/lsp.lua delete mode 100644 lua/custom/plugins/lualine.lua delete mode 100644 lua/custom/plugins/luasnip.lua delete mode 100644 lua/custom/plugins/markdown_preview.lua delete mode 100644 lua/custom/plugins/neogen.lua delete mode 100644 lua/custom/plugins/obsidian.lua delete mode 100644 lua/custom/plugins/oil.lua delete mode 100644 lua/custom/plugins/telescope.lua delete mode 100644 lua/custom/plugins/tmux_navigator.lua delete mode 100644 lua/custom/plugins/todo.lua delete mode 100644 lua/custom/plugins/treesitter.lua delete mode 100644 lua/custom/plugins/trouble.lua delete mode 100644 lua/custom/plugins/which_key.lua delete mode 100644 lua/custom/telescope.lua delete mode 100644 lua/custom/todo.lua delete mode 100644 lua/custom/treesitter.lua delete mode 100644 lua/custom/trouble.lua delete mode 100644 main.py create mode 160000 neovim create mode 100644 nvim-pack-lock.json rename {lua/custom/snippets => snippets}/README.md (100%) rename {lua/custom/snippets => snippets}/all.lua (100%) rename {lua/custom/snippets => snippets}/lua.lua (100%) rename {lua/custom/snippets => snippets}/markdown.lua (100%) rename {lua/custom/snippets => snippets}/python.lua (100%) diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..21d430f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM ubuntu:24.04 AS builder +WORKDIR /src +RUN apt-get update -y && apt-get install -y \ + cmake gettext build-essential ninja-build git +COPY neovim . +RUN make CMAKE_BUILD_TYPE=RelWithDebInfo +RUN make install DESTDIR=/build-output + +FROM ubuntu:24.04 AS runner +COPY --from=builder /build-output / +COPY --from=golang:1.24 /usr/local/go /usr/local/go +ENV PATH="/usr/local/go/bin:${PATH}" +RUN apt-get update -y && apt-get install -y \ + git curl gpg software-properties-common fzf fd-find ripgrep \ + && add-apt-repository ppa:deadsnakes/ppa \ + && curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \ + && apt-get install -y python3.13 python3.13-venv python3-pip nodejs \ + && rm -rf /var/lib/apt/lists/* \ + && npm install -g tree-sitter-cli \ + && python3.13 -m pip install --break-system-packages pynvim +RUN npm install -g neovim +RUN useradd -m -s /bin/bash t0xa +WORKDIR /home/t0xa/.config/nvim +COPY . . + +RUN chown -R t0xa /home/t0xa +USER t0xa diff --git a/README.md b/README.md index e144f85..d7d9f31 100644 --- a/README.md +++ b/README.md @@ -1,71 +1,5 @@ -# Config refactor (v2.0) -## Useful links -- [Переписывание конфига с автором telescope](https://www.youtube.com/watch?v=kJVqxFnhIuw&t=510s) -- [Документация по Lua в Nvim](https://neovim.io/doc/user/lua-guide.html) -- [Конфиг TJ](https://github.com/tjdevries/config.nvim/tree/master) -## Основные прицнипы формирования конфига -### Root plugin папка -Скрипты в этой папке загружаются автоматически после инициализации `neovim`, но до загрузки файлов типа `ftplugin/` или `after/`. -### Plugins -Разберем на примере `oil.nvim`: Сначала базовые настройки, такие как инструкция откуда качать и всякие зависимости и атрибуты по типу приоритета кладутся в директорию `custom/plugins` в виде названия плагина: -*lua/custom/plugins/oil.lua* -```lua -return { - "stevearc/oil.nvim", - dependencies = { { "echasnovski/mini.icons", opts = {} } }, - config = function() - require "custom/oil" - end, -} +# Установка LSP серверов +## Python ``` -Затем, как можно видеть, сама функция настроек расположена отдельно в файле с идентичным названием, но в директории "повыше": -*lua/custom/oil.lua* -```lua -require("oil").setup{ - opts = { - keymaps = { - ["g?"] = "actions.show_help", - }, - }, -} +npm -i pyright ``` - -## Разница между ftplugin и after/ftplugin -Суть одна и та-же: загрузка конфигураций для конкретных типов файлов, однако: -### ftplugin -Тут храняться настройки, которые будут применены **до** загразуки плагинов. Т.е. настройки, что определны где-то в настройках плагинов будут переписывать если что те, которые установлены для типов файлов тут -### after/ftplugin -Настройки для типов файлов тут будут применены уже после того, как загрузится все содержимое neovim => эти настройки будут перегружать все то, что было настроено в плагинах -## Включение / Выключение некоторых плагинов -Из за возникновения случаев, когда некоторые плагины на некоторых машинах не нужно включать (например obsidian мне нужен только на хостовых машинах, на удаленных он будет только мешать открывать .md файлы), то в `init.lua` у меня в самом начале устанавливаются для таких плагинов глобальные переменные со следующей семантикой: -``` -vim.g._enabled = -``` -Например: -```lua -vim.g.obsidian_enabled = false -``` -Это позволяет динамически включать/выключать плагины без необходимости усложнять конфиг `lazy` -# FAQ -> Зачем так мучаться? Не проще все кидать в один файл? - -Проще, но такое распараллеливание позволяет легче дебажить файлы настроек. Т.е. исправляя настройки мы можем просто `source`ить файл настроек, не трогая конфигурации скачивания файлов, чтобы лишний раз не триггерить Lazy. - -> Что делать, если в `checkhealth` выдается ошибка `luarocks not found`? - -Необходимо его установить по инструкции с [сайта](https://luarocks.org/) - -> Что делать, если при установке `luarocks` выдает ошибку что не найдены `.h` файлы? - -Надо установить хэдеры lua командой: -```bash -sudo apt install liblua5.3-dev -``` - -> checkhealth не может найти tree-sitter cli - -Надо установить соответствующий `npm` пакет: -```js -npm install -g tree-sitter-cli -``` - diff --git a/compiler/mypy.vim b/compiler/mypy.vim deleted file mode 100644 index b8fb241..0000000 --- a/compiler/mypy.vim +++ /dev/null @@ -1,6 +0,0 @@ -if exists("current_compiler") - finish -endif -let current_compiler = "mypy" - -lua require("custom.compilers.mypy").setup() diff --git a/ftplugin/markdown.lua b/ftplugin/markdown.lua index d32d7ff..f57c491 100644 --- a/ftplugin/markdown.lua +++ b/ftplugin/markdown.lua @@ -1,60 +1,10 @@ local keymap = vim.keymap --- Picker for markdown headers --- local pickers = require("telescope.pickers") --- local finders = require("telescope.finders") --- local conf = require("telescope.config").values --- local actions = require("telescope.actions") --- local action_state = require("telescope.actions.state") --- --- local function markdown_headings() --- local bufnr = vim.api.nvim_get_current_buf() --- local lines = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false) --- local headings = {} --- --- for lnum, line in ipairs(lines) do --- local heading = line:match('^(#+%s+.+)$') --- if heading then --- table.insert(headings, { --- lnum = lnum, --- text = heading, --- display = string.format("%4d: %s", lnum, heading) --- }) --- end --- end --- pickers.new({}, { --- prompt_title = 'Markdown Headings', --- finder = finders.new_table { --- results = headings, --- entry_maker = function(entry) --- return { --- value = entry, --- display = entry.display, --- ordinal = entry.text, --- lnum = entry.lnum, --- } --- end --- }, --- sorter = conf.generic_sorter({}), --- attach_mappings = function(prompt_bufnr, map) --- actions.select_default:replace(function() --- actions.close(prompt_bufnr) --- local selection = action_state.get_selected_entry() --- vim.api.nvim_win_set_cursor(0, { selection.value.lnum, 0 }) --- end) --- return true --- end, --- }):find() --- end --- --- keymap.set("n", "fdh", markdown_headings, { desc = "Grep: Markdown headings" }) - -- FZF lua headings picker local picker = require("fzf-lua") local function fzf_lua_markdown_headings() local bufnr = vim.api.nvim_get_current_buf() - local lines = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false) local headings = {} -- Check if treesitter parser is available diff --git a/init.lua b/init.lua index 7f4af20..20d1e67 100644 --- a/init.lua +++ b/init.lua @@ -1,41 +1,498 @@ --- Global settings params ---- Option to enable/disalbe obsidian plugin -vim.g.obsidian_enabled = false +-- Locals +local keymap = vim.keymap.set --- Making leader () key to space -vim.g.mapleader = "\\" --- Making local leader () key to backslash -vim.g.maplocalleader = "" --- Enable project-level config extensions -vim.opt.exrc = true -vim.opt.secure = true +-- Vim pack plugins list +vim.pack.add( + { + 'https://github.com/nvim-treesitter/nvim-treesitter', + 'https://github.com/folke/snacks.nvim', + 'https://github.com/stevearc/oil.nvim', + 'https://github.com/neovim/nvim-lspconfig', + 'https://github.com/folke/which-key.nvim', + 'https://github.com/mason-org/mason.nvim', + 'https://github.com/ibhagwan/fzf-lua', + 'https://github.com/nvim-lualine/lualine.nvim', + 'https://github.com/L3MON4D3/LuaSnip', + 'https://github.com/danymat/neogen', + 'https://github.com/christoomey/vim-tmux-navigator', + 'https://github.com/folke/todo-comments.nvim', + -- Colorschemes + 'https://github.com/ellisonleao/gruvbox.nvim', + 'https://github.com/sainnhe/everforest', + 'https://github.com/sainnhe/gruvbox-material', + 'https://github.com/rebelot/kanagawa.nvim', + 'https://github.com/catppuccin/nvim', + 'https://github.com/folke/tokyonight.nvim', + 'https://github.com/luisiacc/gruvbox-baby', + -- Completion + 'https://github.com/hrsh7th/nvim-cmp', + 'https://github.com/hrsh7th/cmp-buffer', + 'https://github.com/hrsh7th/cmp-path', + 'https://github.com/hrsh7th/cmp-nvim-lsp', + 'https://github.com/saadparwaiz1/cmp_luasnip', + } +) +-- ################################## Plugins ################################## +-- → → → → → → Colorschemes ← ← ← ← ← ← +vim.opt.termguicolors = true +vim.opt.background = "dark" +vim.opt.signcolumn = "yes" --- Bootstrap lazy.nvim -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - 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() - os.exit(1) +vim.g.gruvbox_material_enable_italic = true +vim.cmd.colorscheme("catppuccin-mocha") + +-- → → → → → → Oil ← ← ← ← ← ← +-- Oil setup +require("oil").setup() +-- Oil Keymaps +vim.keymap.set("n", "-", "Oil", { desc = "Open parent directory" }) + +-- → → → → → → Snacks ← ← ← ← ← ← +-- Snacks setup +require("snacks").setup({ + input = { enabled = true }, + picker = { enabled = true }, +}) + +-- → → → → → → Treesitter ← ← ← ← ← ← +-- Treesitter setup +require("nvim-treesitter").setup( + { + -- Directory to install parsers and queries to (prepended to `runtimepath` to have priority) + install_dir = vim.fn.stdpath('data') .. '/site', + sync_install = false, + highlight = { enable = true }, + indent = { enable = true }, + } +) +require('nvim-treesitter').install { 'python', 'lua', 'vim', 'vimdoc', 'javascript', 'html', 'go', 'markdown' } + +-- → → → → → → Mason ← ← ← ← ← ← +-- Mason setup +require("mason").setup() + +-- → → → → → → FZF-lua ← ← ← ← ← ← +-- FZF-lua setup +local fzf_lua = require("fzf-lua") +fzf_lua.setup( + { + winopts = { + height = 0.85, + width = 0.80, + }, + fzf_opts = { + ['--layout'] = 'reverse-list', + }, + files = { + fd_opts = "--color=never --type f", + rg_opts = "--color=never --files", + }, + keymap = { + fzf = { + ["ctrl-q"] = "select-all+accept", + }, + builtin = { + [""] = "down", + [""] = "up", + [""] = "toggle+up", + [""] = "toggle+down", + }, + }, + } +) +-- FZF-lua support functions +-- Glob pattern searcher +local function live_grep_with_glob() + vim.ui.input({ + prompt = "Glob pattern: ", + default = "/home/user/Work/root/ivideon/audio_storage/", + }, function(input) + if input then + fzf_lua.live_grep({ + cwd = input, + }) + end + end) +end + +local function live_grep_in_current_dir() + local current_file = vim.fn.expand('%:p') + local current_dir = current_file:match("(.*/)") + + vim.ui.input({ + prompt = "Glob pattern: ", + default = current_dir or vim.fn.getcwd(), + }, function(input) + if input then + fzf_lua.live_grep({ + cwd = input, + }) + end + end) +end + +local function copy_current_file_path() + local filepath = vim.fn.expand('%:p') + vim.fn.setreg("+", filepath) + print("Copied: " .. filepath) +end + +local function copy_file_path_and_position() + local filepath = vim.fn.expand('%:p') + local cursor_pos = vim.api.nvim_win_get_cursor(0) + local line = cursor_pos[1] + local col = cursor_pos[2] + 1 -- fzf-lua uses 1-indexed columns + + local output = string.format("%s:%d:%d", filepath, line, col) + vim.fn.setreg("+", output) + print("Copied: " .. output) +end + +local function live_grep_in_quick_fix_list_files() + local qf_items = vim.fn.getqflist() + local files = {} + + for _, item in ipairs(qf_items) do + if item.bufnr > 0 then + local filename = vim.api.nvim_buf_get_name(item.bufnr) + if filename ~= "" then + table.insert(files, filename) + end + end + end + + if #files > 0 then + fzf_lua.live_grep({ + search_dirs = files, + }) + else + print("No files in quickfix list") end end -vim.opt.rtp:prepend(lazypath) --- Setup lazy.nvim -require("lazy").setup({ - spec = { - -- import your plugins - { import = "custom/plugins" }, +local function find_all_files_including_hidden() + fzf_lua.files( + { + fd_opts = "--type f --hidden --no-ignore" + } + ) +end + +-- Function for getting filename and copy it to + buffer +local function copy_filename() + local filepath = vim.fn.expand('%:t') + local output = string.format("%s", filepath) + vim.fn.setreg("+", output) + print("Copied: " .. output) +end + +-- FZF-lua keymaps +keymap("n", "ff", function() fzf_lua.files() end, { desc = "FZF: find files in cwd" }) +keymap("n", "fg", function() fzf_lua.live_grep() end, { desc = "FZF: find string in cwd" }) +keymap("n", "fs", function() fzf_lua.grep_cword() end, { desc = "FZF: find string under cursor" }) +keymap("n", "fb", function() fzf_lua.buffers() end, { desc = "FZF: display opened buffers" }) +keymap("n", "fh", function() fzf_lua.help_tags() end, { desc = "FZF: display help tags" }) +keymap("n", "fml", function() fzf_lua.marks() end, { desc = "FZF: find marks list" }) +keymap("n", "fmp", function() fzf_lua.man_pages() end, { desc = "FZF: find available man pages" }) +keymap("n", "fds", function() fzf_lua.lsp_document_symbols() end, { desc = "Grep: Document symbols" }) +-- keymap("n", "fgb", function() fzf_lua.git_blame() end, { desc = "Grep: Document symbols" }) +keymap("n", "ft", function() fzf_lua.tabs() end, { desc = "Pick opened tabs" }) + +keymap("n", "fa", find_all_files_including_hidden, { desc = "FZF: Find all files" }) +keymap('n', 'fp', live_grep_with_glob, { desc = 'Live grep with glob pattern' }) +keymap('n', 'fcp', live_grep_in_current_dir, { desc = 'Live grep in current directory' }) +keymap('n', 'ccp', copy_file_path_and_position, { desc = "Copy cursor position" }) +keymap('n', 'ccd', copy_current_file_path, { desc = 'Copy current file path' }) +keymap('n', 'ccf', copy_filename, { desc = 'Copy current file path' }) +keymap("n", "fcgb", function() + fzf_lua.git_blame({ + winopts = { + preview = { hidden = "hidden" } + } + }) +end, { desc = "Grep: Document symbols" }) + +keymap('n', 'fq', live_grep_in_quick_fix_list_files, { desc = "Live grep in quickfix files" }) + +keymap('n', 'fcf', function() + fzf_lua.live_grep({ + cwd = vim.fn.expand('%:p:h'), + search = '', + fzf_cli_args = '--no-sort', + }) +end, { desc = "Live grep in current file" }) + + +keymap("n", "fn", function() + fzf_lua.grep({ + prompt = 'Todo❯ ', + search = 'TODO|FIXME|XXX|HACK|BUG|NOTE|PERF|OPTIMIZE', + no_esc = true, + }) +end, { desc = "FZF: display TODO comments" }) + +-- → → → → → → Lualine ← ← ← ← ← ← +-- Lualine setup +require("lualine").setup({ + options = { + theme = "catppuccin-mocha", + }, + sections = { + lualine_c = { + { + "filename", + file_status = true, + path = 2, + }, + }, }, - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "gruvbox-material" } }, - -- automatically check for plugin updates - checker = { enabled = false }, +}) + +-- → → → → → → LuaSnip ← ← ← ← ← ← +-- LuaSnip config +local ls = require "luasnip" + +-- Load custom snippets +for _, ft_path in ipairs(vim.api.nvim_get_runtime_file("snippets/*.lua", true)) do + loadfile(ft_path)() +end + +-- LuaSnip keymaps +ls.config.set_config { + history = true, + updateevents = "TextChanged, TextChangedI", + enable_autosnippets = true, + store_selection_keys = "", +} + +vim.keymap.set({ "i", "s" }, "", function() + if ls.expand_or_jumpable() then + ls.expand_or_jump() + end +end, { silent = true }) + +vim.keymap.set({ "i", "s" }, "", function() + if ls.jumpable() then + ls.jump(-1) + end +end, { silent = true }) + +vim.keymap.set({ "i", "s" }, "", function() + if ls.choice_active() then + ls.change_choice(1) + end +end, { silent = true }) + +vim.keymap.set("n", "s", "source ~/.config/nvim/lua/custom/luasnip.lua") + + +-- → → → → → → Neogen ← ← ← ← ← ← +-- Neogen setup +require("neogen").setup { + enabled = true, + languages = { + python = { + template = { + annotation_convention = "reST" + } + } + }, +} + +-- Neogen keymaps +local opts = { noremap = true, silent = true } +vim.keymap.set("n", "ids", ":lua require('neogen').generate()", opts) + +-- → → → → → → Vim Tmux Navigator ← ← ← ← ← ← +-- Keymaps +vim.keymap.set("n", "", "TmuxNavigateLeft", { noremap = true, silent = true }) +vim.keymap.set("n", "", "TmuxNavigateDown", { noremap = true, silent = true }) +vim.keymap.set("n", "", "TmuxNavigateUp", { noremap = true, silent = true }) +vim.keymap.set("n", "", "TmuxNavigateRight", { noremap = true, silent = true }) +vim.keymap.set("n", "", "TmuxNavigatePrevious", { noremap = true, silent = true }) + +-- → → → → → → Completion ← ← ← ← ← ← +vim.opt.completeopt = { "menu", "menuone", "noselect" } + +local cmp = require "cmp" + +cmp.setup { + sources = { + { name = "luasnip" }, + { name = "nvim_lsp" }, + { name = "path" }, + { name = "buffer" }, + }, + mapping = { + [""] = cmp.mapping.select_next_item { behavior = cmp.SelectBehavior.Insert }, + [""] = cmp.mapping.select_prev_item { behavior = cmp.SelectBehavior.Insert }, + [""] = cmp.mapping( + cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Insert, + select = true, + }, + { "i", "c" } + ), + }, + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, +} + +-- → → → → → → LspConfig ← ← ← ← ← ← +-- Locals +local picker = "FzfLua" +local capabilities = nil +local servers = { + gopls = { + settings = { + gopls = { + hints = { + assignVariableTypes = true, + compositeLiteralFields = true, + compositeLiteralTypes = true, + constantValues = true, + functionTypeParameters = true, + parameterNames = true, + rangeVariableTypes = true, + }, + }, + }, + }, + ruff = { + init_options = { + settings = { + -- Ruff language server settings go here + logLevel = "error", + }, + }, + }, + pyright = { + settings = { + pyright = { + -- Using Ruff's import organizer + disableOrganizeImports = true, + }, + python = { + analysis = { + -- Ignore all files for analysis to exclusively use Ruff for linting + -- ignore = { "*" }, + diagnosticMode = "off", + -- typeCheckingMode = "off", + }, + }, + }, + }, + lua_ls = { + capabilities = capabilities, + settings = { + Lua = { + -- make the language server recognize "vim" global + diagnostics = { + globals = { "vim" }, + }, + completion = { + callSnippet = "Replace", + }, + }, + }, + }, + clangd = { + filetypes = { "c", "cpp" }, + cmd = { + "clangd", + "--offset-encoding=utf-16", + }, + }, + html = { + filetypes = { "html", "gohtml" }, + }, + eslint = { + filetypes = { "javascript", "typescript", "html", "gohtml" }, + }, + ts_ls = { + filetypes = { "javascript", "typescript" }, + }, +} + +-- Setup +if pcall(require, "cmp_nvim_lsp") then + capabilities = require("cmp_nvim_lsp").default_capabilities() +end + +-- Enable the configured servers +vim.lsp.enable(vim.tbl_keys(servers)) + +-- Keymaps +-- Here it is used the LSP server attaches to file +vim.api.nvim_create_autocmd("LspAttach", { + -- Grouping together autocommands. + -- Here we creating new group and calling it "UserLspConfig" + group = vim.api.nvim_create_augroup("UserLspConfig", {}), + -- callback defining logic to execute on the event + callback = function(ev) + -- Buffer local mappings. + -- See `:help vim.lsp.*` for documentation on any of the below functions + local opts = { buffer = ev.buf, silent = true } + + -- set keybinds + -- show definition, references + opts.desc = "Show LSP references" + vim.keymap.set("n", "gR", string.format("%s lsp_references", picker), opts) + + -- go to declaration + opts.desc = "Go to declaration" + vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts) + + -- show lsp definitions + opts.desc = "Show LSP definitions" + vim.keymap.set("n", "gd", string.format("%s lsp_definitions", picker), opts) + + -- show lsp implementations + opts.desc = "Show LSP implementations" + vim.keymap.set("n", "gi", string.format("%s lsp_implementations", picker), opts) + + -- show lsp type definitions + opts.desc = "Show LSP type definitions" + vim.keymap.set("n", "glt", string.format("%s lsp_type_definitions", picker), opts) + + -- see available code actions, in visual mode will apply to selection + opts.desc = "See available code actions" + vim.keymap.set({ "n", "v" }, "ca", vim.lsp.buf.code_action, opts) + + -- smart rename + opts.desc = "Smart rename" + vim.keymap.set("n", "rn", vim.lsp.buf.rename, opts) + + -- show diagnostics for file + opts.desc = "Show buffer diagnostics" + vim.keymap.set("n", "D", string.format("%s diagnostics bufnr=0", picker), opts) + + -- show diagnostics for line + opts.desc = "Show line diagnostics" + vim.keymap.set("n", "d", vim.diagnostic.open_float, opts) + + -- jump to previous diagnostic in buffer + opts.desc = "Go to previous diagnostic" + vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) + + -- jump to next diagnostic in buffer + opts.desc = "Go to next diagnostic" + vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts) + + -- show documentation for what is under cursor + opts.desc = "Show documentation for what is under cursor" + vim.keymap.set("n", "K", vim.lsp.buf.hover, opts) + + -- mapping to restart lsp if necessary + opts.desc = "Restart LSP" + vim.keymap.set("n", "rs", ":LspRestart", opts) + + opts.desc = "Run formatting on current buffer" + vim.keymap.set("n", "f", function() + vim.lsp.buf.format({ async = true }) + end, opts) + end, }) diff --git a/lua/custom/README.md b/lua/custom/README.md deleted file mode 100644 index d725dd7..0000000 --- a/lua/custom/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# Справка по интересным моментам в коде -## Функция получения версии `python` в `lsp.lua` - -```lua -local function get_python_version() - local handle = io.popen("python --version 2>&1") -- Redirect stderr to stdout - if handle then - local result = handle:read("*a") - handle:close() - -- Check if the output contains a version number - local version = result:match("Python (%d+%.%d+%.%d+)") - if version then - return version - end - end - - handle = io.popen("python3 --version 2>&1") -- Redirect stderr to stdout - if handle then - local result = handle:read("*a") - handle:close() - -- Check if the output contains a version number - local version = result:match("Python (%d+%.%d+%.%d+)") - if version then - return version - end - end - -- TODO: Add some exception handling if python not installed on user machine - return "Python 0.0.0" -end -``` -Что тут есть примечательного: -- Получение данных, выполняя команду в shell оболочке системы с помощью - `io.popen`. *Важно*: Данная функция может работать не во всех ОС -- Функция выполняет команду, указанную в аргументе, и возвращает *файловый - дескриптор*, который можно использовать для чтения вывода команды (или - записи в нее) - -Разберем флоу подробнее: -Если про `python --version` - все понятно, то вот: -```lua -2>&1 -``` -Уже надо прояснить: -- В UNIX-подобных системах есть три стандартных потока - `stdin` = 0; `stdout` = 1; - `strerr` = 2; -- По умолчанию `io.popen` передает только вывод `stdout` в handle, поэтому для обработки -ошибок, надо дополнительно захватывать поток `stderr` -- `2>&1` означает, что мы хотим перенаправить поток ошибок 2 в стандартный вывод 1; -- Это нужно для того, чтобы захватить не только вывод команды, но и возможные ошибки -(например если питон не установлен); -- `>&` - оператор перенаправления потоков. - -Дополнительно: -`*a` внутри `read` - конструкция формата чтения файловых объектов в `Lua`. Они -указывают - как именно стоит читать данные из файла или потока. Помимо `a` есть -еще: -- `*a` - читать все содержимое -- `*l` - читать строку -- `*n` - читать число. diff --git a/lua/custom/colorschemes.lua b/lua/custom/colorschemes.lua deleted file mode 100644 index 12ce783..0000000 --- a/lua/custom/colorschemes.lua +++ /dev/null @@ -1,9 +0,0 @@ --- Turn on termguicolors for colorschemes --- (Have to use true color terminal to see theese setting work) -vim.opt.termguicolors = true -vim.opt.background = "dark" -- colorschemes that can be light or dark will be made dark -vim.opt.signcolumn = "yes" -- show sigh columns so that text doesn't shift - --- vim.g.gruvbox_material_background = 'hard' -vim.g.gruvbox_material_enable_italic = true -vim.cmd.colorscheme("catppuccin-mocha") diff --git a/lua/custom/compilers/mypy.lua b/lua/custom/compilers/mypy.lua deleted file mode 100644 index 1ddb2db..0000000 --- a/lua/custom/compilers/mypy.lua +++ /dev/null @@ -1,12 +0,0 @@ -local M = {} - -function M.setup() - vim.opt_local.makeprg = "mypy ." - vim.opt_local.errorformat = table.concat({ - "%f:%l:%c:%t%*[^:]: %m", - "%f:%l:%t%*[^:]: %m", - "%f:%l: %m", - }, ",") -end - -return M diff --git a/lua/custom/completion.lua b/lua/custom/completion.lua deleted file mode 100644 index 1561b94..0000000 --- a/lua/custom/completion.lua +++ /dev/null @@ -1,64 +0,0 @@ --- Set some settings for competion --- For more info type `:help completeopt` --- menu: Show menu when completions available (more than 1) --- menuone: Show menu even when there is only 1 option --- noselect: Force user to select convinient option - --- Load luasnip setup -require "custom.luasnip" - -vim.opt.completeopt = { "menu", "menuone", "noselect" } - -local lspkind = require "lspkind" - -local kind_formatter = lspkind.cmp_format { - mode = "symbol_text", - menu = { - buffer = "[buf]", - nvim_lsp = "[LSP]", - nvim_lua = "[api]", - path = "[path]", - luasnip = "[snip]", - gh_issues = "[issues]", - tn = "[TabNine]", - eruby = "[erb]", - }, -} - -local cmp = require "cmp" - -cmp.setup { - sources = { - { name = "luasnip" }, - { name = "nvim_lsp" }, - { name = "path" } - }, - mapping = { - [""] = cmp.mapping.select_next_item { behavior = cmp.SelectBehavior.Insert }, - [""] = cmp.mapping.select_prev_item { behavior = cmp.SelectBehavior.Insert }, - [""] = cmp.mapping( - cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Insert, - select = true, - }, - { "i", "c" } - ), - }, - - -- Enable luasnip to handle snippet expansion for nvim-cmp - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - }, - - formatting = { - fields = { "abbr", "kind", "menu" }, - expandable_indicator = true, - format = function(entry, vim_item) - -- Lspkind setup for icons - vim_item = kind_formatter(entry, vim_item) - return vim_item - end, - }, -} diff --git a/lua/custom/fzf_lua.lua b/lua/custom/fzf_lua.lua deleted file mode 100644 index 8314988..0000000 --- a/lua/custom/fzf_lua.lua +++ /dev/null @@ -1,161 +0,0 @@ -local fzf_lua = require("fzf-lua") - -fzf_lua.setup({ - winopts = { - height = 0.85, - width = 0.80, - }, - fzf_opts = { - ['--layout'] = 'reverse-list', - }, - files = { - fd_opts = "--color=never --type f", - rg_opts = "--color=never --files", - }, - keymap = { - fzf = { - ["ctrl-q"] = "select-all+accept", - }, - builtin = { - [""] = "down", - [""] = "up", - [""] = "toggle+up", - [""] = "toggle+down", - }, - }, -}) - --- Glob pattern searcher -local function live_grep_with_glob() - vim.ui.input({ - prompt = "Glob pattern: ", - default = "/home/user/Work/root/ivideon/audio_storage/", - }, function(input) - if input then - fzf_lua.live_grep({ - cwd = input, - }) - end - end) -end - -local function live_grep_in_current_dir() - local current_file = vim.fn.expand('%:p') - local current_dir = current_file:match("(.*/)") - - vim.ui.input({ - prompt = "Glob pattern: ", - default = current_dir or vim.fn.getcwd(), - }, function(input) - if input then - fzf_lua.live_grep({ - cwd = input, - }) - end - end) -end - -local function copy_current_file_path() - local filepath = vim.fn.expand('%:p') - vim.fn.setreg("+", filepath) - print("Copied: " .. filepath) -end - -local function copy_file_path_and_position() - local filepath = vim.fn.expand('%:p') - local cursor_pos = vim.api.nvim_win_get_cursor(0) - local line = cursor_pos[1] - local col = cursor_pos[2] + 1 -- fzf-lua uses 1-indexed columns - - local output = string.format("%s:%d:%d", filepath, line, col) - vim.fn.setreg("+", output) - print("Copied: " .. output) -end - -local function live_grep_in_quick_fix_list_files() - local qf_items = vim.fn.getqflist() - local files = {} - - for _, item in ipairs(qf_items) do - if item.bufnr > 0 then - local filename = vim.api.nvim_buf_get_name(item.bufnr) - if filename ~= "" then - table.insert(files, filename) - end - end - end - - if #files > 0 then - fzf_lua.live_grep({ - search_dirs = files, - }) - else - print("No files in quickfix list") - end -end - -local function find_all_files_including_hidden() - fzf_lua.files( - { - fd_opts = "--type f --hidden --no-ignore" - } - ) -end - --- Function for getting filename and copy it to + buffer -local function copy_filename() - local filepath = vim.fn.expand('%:t') - local output = string.format("%s", filepath) - vim.fn.setreg("+", output) - print("Copied: " .. output) -end - -vim.api.nvim_create_user_command('FzfLuaGrepGlob', live_grep_with_glob, {}) - -local keymap = vim.keymap.set - - -keymap("n", "ff", function() fzf_lua.files() end, { desc = "FZF: find files in cwd" }) -keymap("n", "fg", function() fzf_lua.live_grep() end, { desc = "FZF: find string in cwd" }) -keymap("n", "fs", function() fzf_lua.grep_cword() end, { desc = "FZF: find string under cursor" }) -keymap("n", "fb", function() fzf_lua.buffers() end, { desc = "FZF: display opened buffers" }) -keymap("n", "fh", function() fzf_lua.help_tags() end, { desc = "FZF: display help tags" }) - --- Your custom commands -keymap("n", "fa", find_all_files_including_hidden, { desc = "FZF: Find all files" }) -keymap('n', 'fp', live_grep_with_glob, { desc = 'Live grep with glob pattern' }) -keymap('n', 'fcp', live_grep_in_current_dir, { desc = 'Live grep in current directory' }) -keymap('n', 'ccp', copy_file_path_and_position, { desc = "Copy cursor position" }) -keymap('n', 'ccd', copy_current_file_path, { desc = 'Copy current file path' }) -keymap('n', 'ccf', copy_filename, { desc = 'Copy current file path' }) -keymap("n", "fcgb", function() - fzf_lua.git_blame({ - winopts = { - preview = { hidden = "hidden" } - } - }) -end, { desc = "Grep: Document symbols" }) - -keymap('n', 'fq', live_grep_in_quick_fix_list_files, { desc = "Live grep in quickfix files" }) - -keymap('n', 'fcf', function() - fzf_lua.live_grep({ - cwd = vim.fn.expand('%:p:h'), - search = '', - fzf_cli_args = '--no-sort', - }) -end, { desc = "Live grep in current file" }) - -keymap("n", "fml", function() fzf_lua.marks() end, { desc = "FZF: find marks list" }) -keymap("n", "fmp", function() fzf_lua.man_pages() end, { desc = "FZF: find available man pages" }) -keymap("n", "fds", function() fzf_lua.lsp_document_symbols() end, { desc = "Grep: Document symbols" }) --- keymap("n", "fgb", function() fzf_lua.git_blame() end, { desc = "Grep: Document symbols" }) -keymap("n", "ft", function() fzf_lua.tabs() end, { desc = "Pick opened tabs" }) - -keymap("n", "fn", function() - fzf_lua.grep({ - prompt = 'Todo❯ ', - search = 'TODO|FIXME|XXX|HACK|BUG|NOTE|PERF|OPTIMIZE', - no_esc = true, - }) -end, { desc = "FZF: display TODO comments" }) diff --git a/lua/custom/lsp.lua b/lua/custom/lsp.lua deleted file mode 100644 index 872480c..0000000 --- a/lua/custom/lsp.lua +++ /dev/null @@ -1,235 +0,0 @@ --- Using vim.lsp.config() instead of require('lspconfig') (nvim-lspconfig >= 0.11) - -local keymap = vim.keymap -local picker = "FzfLua" - -local capabilities = nil -if pcall(require, "cmp_nvim_lsp") then - capabilities = require("cmp_nvim_lsp").default_capabilities() -end - - -local servers = { - gopls = { - settings = { - gopls = { - hints = { - assignVariableTypes = true, - compositeLiteralFields = true, - compositeLiteralTypes = true, - constantValues = true, - functionTypeParameters = true, - parameterNames = true, - rangeVariableTypes = true, - }, - }, - }, - }, - ruff = { - init_options = { - settings = { - -- Ruff language server settings go here - logLevel = "error", - }, - }, - }, - pyright = { - settings = { - pyright = { - -- Using Ruff's import organizer - disableOrganizeImports = true, - }, - python = { - analysis = { - -- Ignore all files for analysis to exclusively use Ruff for linting - -- ignore = { "*" }, - diagnosticMode = "off", - -- typeCheckingMode = "off", - }, - }, - }, - }, - lua_ls = { - capabilities = capabilities, - settings = { - Lua = { - -- make the language server recognize "vim" global - diagnostics = { - globals = { "vim" }, - }, - completion = { - callSnippet = "Replace", - }, - }, - }, - }, - clangd = { - filetypes = { "c", "cpp" }, - cmd = { - "clangd", - "--offset-encoding=utf-16", - }, - }, - html = { - filetypes = { "html", "gohtml" }, - }, - eslint = { - filetypes = { "javascript", "typescript", "html", "gohtml" }, - }, - ts_ls = { - filetypes = { "javascript", "typescript" }, - }, -} - -local servers_to_install = vim.tbl_filter(function(key) - local t = servers[key] - if type(t) == "table" then - return not t.manual_install - else - return t - end -end, vim.tbl_keys(servers)) - - - -require("mason").setup() -local ensure_installed = { - -- Normal settings - "stylua", - "lua_ls", - "gofumpt", - "golines", - "prettier", -} - -local function get_python_version() - local handle = io.popen("python --version 2>&1") -- Redirect stderr to stdout - if handle then - local result = handle:read("*a") - handle:close() - -- Check if the output contains a version number - local version = result:match("Python (%d+%.%d+%.%d+)") - if version then - return version - end - end - - handle = io.popen("python3 --version 2>&1") -- Redirect stderr to stdout - if handle then - local result = handle:read("*a") - handle:close() - -- Check if the output contains a version number - local version = result:match("Python (%d+%.%d+%.%d+)") - if version then - return version - end - end - -- TODO: Add some exception handling if python not installed on user machine - return "Python 0.0.0" -end - --- Now we need to make things work in Astra --- Main Astra cockblock - low python version, that prevents installation of --- some modules, so in order to prevent mason from whining - disable some --- autoinstall modules depending on currently installed python version --- NOTE: You must install removed dependencies manually -local python_version = get_python_version() -if python_version == nil then - python_version = "Python 3.13" -end -local _, minor, _ = python_version:match(".*(%d+)%.(%d+)%.(%d+)") -if tonumber(minor) < 8 then - for i, k in pairs(servers_to_install) do - -- Ruff is not supported for python lower than 3.8 - if k == "ruff" then - table.remove(servers_to_install, i) - end - end -end -vim.list_extend(ensure_installed, servers_to_install) -require("mason-tool-installer").setup { ensure_installed = ensure_installed } - -for name, config in pairs(servers) do - if config == true then - config = {} - end - config = vim.tbl_deep_extend("force", {}, { - capabilities = capabilities, - }, config) - - vim.lsp.config(name, config) -end - --- Enable the configured servers -vim.lsp.enable(vim.tbl_keys(servers)) - --- Here it is used the LSP server attaches to file -vim.api.nvim_create_autocmd("LspAttach", { - -- Grouping together autocommands. - -- Here we creating new group and calling it "UserLspConfig" - group = vim.api.nvim_create_augroup("UserLspConfig", {}), - -- callback defining logic to execute on the event - callback = function(ev) - -- Buffer local mappings. - -- See `:help vim.lsp.*` for documentation on any of the below functions - local opts = { buffer = ev.buf, silent = true } - - -- set keybinds - -- show definition, references - opts.desc = "Show LSP references" - keymap.set("n", "gR", string.format("%s lsp_references", picker), opts) - - -- go to declaration - opts.desc = "Go to declaration" - keymap.set("n", "gD", vim.lsp.buf.declaration, opts) - - -- show lsp definitions - opts.desc = "Show LSP definitions" - keymap.set("n", "gd", string.format("%s lsp_definitions", picker), opts) - - -- show lsp implementations - opts.desc = "Show LSP implementations" - keymap.set("n", "gi", string.format("%s lsp_implementations", picker), opts) - - -- show lsp type definitions - opts.desc = "Show LSP type definitions" - keymap.set("n", "glt", string.format("%s lsp_type_definitions", picker), opts) - - -- see available code actions, in visual mode will apply to selection - opts.desc = "See available code actions" - keymap.set({ "n", "v" }, "ca", vim.lsp.buf.code_action, opts) - - -- smart rename - opts.desc = "Smart rename" - keymap.set("n", "rn", vim.lsp.buf.rename, opts) - - -- show diagnostics for file - opts.desc = "Show buffer diagnostics" - keymap.set("n", "D", string.format("%s diagnostics bufnr=0", picker), opts) - - -- show diagnostics for line - opts.desc = "Show line diagnostics" - keymap.set("n", "d", vim.diagnostic.open_float, opts) - - -- jump to previous diagnostic in buffer - opts.desc = "Go to previous diagnostic" - keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) - - -- jump to next diagnostic in buffer - opts.desc = "Go to next diagnostic" - keymap.set("n", "]d", vim.diagnostic.goto_next, opts) - - -- show documentation for what is under cursor - opts.desc = "Show documentation for what is under cursor" - keymap.set("n", "K", vim.lsp.buf.hover, opts) - - -- mapping to restart lsp if necessary - opts.desc = "Restart LSP" - keymap.set("n", "rs", ":LspRestart", opts) - - opts.desc = "Run formatting on current buffer" - keymap.set("n", "f", function() - vim.lsp.buf.format({ async = true }) - end, opts) - end, -}) diff --git a/lua/custom/lualine.lua b/lua/custom/lualine.lua deleted file mode 100644 index 6d8b766..0000000 --- a/lua/custom/lualine.lua +++ /dev/null @@ -1,14 +0,0 @@ -require("lualine").setup({ - options = { - theme = "catppuccin-mocha", - }, - sections = { - lualine_c = { - { - "filename", - file_status = true, - path = 2, - }, - }, - }, -}) diff --git a/lua/custom/luasnip.lua b/lua/custom/luasnip.lua deleted file mode 100644 index 9b98678..0000000 --- a/lua/custom/luasnip.lua +++ /dev/null @@ -1,34 +0,0 @@ -local ls = require "luasnip" -local types = require "luasnip.util.types" - -ls.config.set_config { - history = true, - updateevents = "TextChanged, TextChangedI", - enable_autosnippets = true, - store_selection_keys = "", -} - -vim.keymap.set({ "i", "s" }, "", function() - if ls.expand_or_jumpable() then - ls.expand_or_jump() - end -end, { silent = true }) - -vim.keymap.set({ "i", "s" }, "", function() - if ls.jumpable() then - ls.jump(-1) - end -end, { silent = true }) - -vim.keymap.set({ "i", "s" }, "", function() - if ls.choice_active() then - ls.change_choice(1) - end -end, { silent = true }) - -vim.keymap.set("n", "s", "source ~/.config/nvim/lua/custom/luasnip.lua") - --- Load custom snippets -for _, ft_path in ipairs(vim.api.nvim_get_runtime_file("lua/custom/snippets/*.lua", true)) do - loadfile(ft_path)() -end diff --git a/lua/custom/neogen.lua b/lua/custom/neogen.lua deleted file mode 100644 index a1538a1..0000000 --- a/lua/custom/neogen.lua +++ /dev/null @@ -1,14 +0,0 @@ -require("neogen").setup { - enabled = true, - languages = { - python = { - template = { - annotation_convention = "reST" - } - } - }, -} - -local keymap = vim.keymap -local opts = { noremap = true, silent = true } -keymap.set("n", "ids", ":lua require('neogen').generate()", opts) diff --git a/lua/custom/obsidian.lua b/lua/custom/obsidian.lua deleted file mode 100644 index 1d02283..0000000 --- a/lua/custom/obsidian.lua +++ /dev/null @@ -1,72 +0,0 @@ -require("obsidian").setup { - -- Set workspace setting - workspaces = { - { - name = "personal", - path = "~/Documents/t0xa_vault", - } - }, - -- Disable conceal level to supress varning log message - ui = { - enable = false - }, - -- Set notes subdir to store new notes - notes_subdir = "Unsorted", - new_notes_location = "notes_subdir", - -- Set template params - templates = { - folder = "Templates", - date_format = "%Y-%m-%d", - time_format = "%H:%M", - substitutions = { - yesterday = function() - return os.date("%Y-%m-%d", os.time() - 86400) - end - } - }, - -- Set behaviour of following links - follow_url_func = function(url) - -- vim.fn.jobstart({ "open", url }) -- Mac OS - vim.fn.jobstart({ "xdg-open", url }) -- linux - -- vim.cmd(':silent exec "!start ' .. url .. '"') -- Windows - -- vim.ui.open(url) -- need Neovim 0.10.0+ - end, - -- Set behaviour for opening images - follow_img_func = function(img) - -- vim.fn.jobstart { "qlmanage", "-p", img } -- Mac OS quick look preview - vim.fn.jobstart({ "xdg-open", url }) -- linux - -- vim.cmd(':silent exec "!start ' .. url .. '"') -- Windows - end, - -- Set sorting for creation date - sort_by = "created", - -- Set attachements new folder - attachments = { - img_folder = "Media" - }, - -- Disable auto formatter for files - disable_frontmatter = true, -} - - --- Obsidian-related keybinds -vim.keymap.set("n", "oit", "ObsidianTemplate", - { silent = true, noremap = true, desc = "Obsidian: insert template" }) -vim.keymap.set("n", "oo", "ObsidianQuickSwitch", - { silent = true, noremap = true, desc = "Obsidian: open file" }) -vim.keymap.set("n", "opi", "ObsidianPasteImg", - { silent = true, noremap = true, desc = "Obsidian: paste image" }) -vim.keymap.set("n", "or", "ObsidianRename", - { silent = true, noremap = true, desc = "Obsidian: rename file" }) -vim.keymap.set("n", "oc", "ObsidianToggleCheckbox", - { silent = true, noremap = true, desc = "Obsidian: toggle checkbox" }) -vim.keymap.set("n", "on", "ObsidianNew", { silent = true, noremap = true, desc = "Obsidian: new file" }) -vim.keymap.set("n", "otoc", "ObsidianTOC", - { silent = true, noremap = true, desc = "Obsidian: open TOC" }) -vim.keymap.set("n", "ofl", "ObsidianFollowLink", - { silent = true, noremap = true, desc = "Obsidian: follow link" }) -vim.keymap.set("n", "olt", "ObsidianTags", - { silent = true, noremap = true, desc = "Obsidian: Get tags list" }) -vim.keymap.set("n", "osb", "ObsidianBacklinks", - { silent = true, noremap = true, desc = "Obsidian: Show Backlinks" }) -vim.keymap.set("n", "osl", "ObsidianLinks", - { silent = true, noremap = true, desc = "Obsidian: Show Links" }) diff --git a/lua/custom/oil.lua b/lua/custom/oil.lua deleted file mode 100644 index cf32130..0000000 --- a/lua/custom/oil.lua +++ /dev/null @@ -1,27 +0,0 @@ -require("oil").setup { - keymaps = { - ["g?"] = "actions.show_help", - [""] = "actions.select", - [""] = { "actions.select", opts = { vertical = true }, desc = "Open the entry in a vertical split" }, - [""] = false, - [""] = { "actions.select", opts = { tab = true }, desc = "Open the entry in new tab" }, - [""] = "actions.preview", - [""] = "actions.close", - [""] = false, - ["-"] = "actions.parent", - ["_"] = "actions.open_cwd", - ["`"] = "actions.cd", - ["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory", mode = "n" }, - ["gs"] = "actions.change_sort", - ["gx"] = "actions.open_external", - ["g."] = "actions.toggle_hidden", - ["g\\"] = "actions.toggle_trash", - ["gr"] = "actions.refresh", - }, - view_options = { - show_hidden = true, - }, - -- Open parent directory in current window -} - -vim.keymap.set("n", "-", "Oil", { desc = "Open parent directory" }) diff --git a/lua/custom/plugins/colorschemes.lua b/lua/custom/plugins/colorschemes.lua deleted file mode 100644 index 7fe659b..0000000 --- a/lua/custom/plugins/colorschemes.lua +++ /dev/null @@ -1,20 +0,0 @@ --- TODO: Need to refactor ways of downloading colorschemes --- Now it is just a hack to download all colorschemes as dependecies -return { - "folke/tokyonight.nvim", - dependencies = { - "ellisonleao/gruvbox.nvim", - "sainnhe/everforest", - "sainnhe/gruvbox-material", - "rebelot/kanagawa.nvim", - "catppuccin/nvim", - "folke/tokyonight.nvim", - "luisiacc/gruvbox-baby", - }, - lazy = false, - priority = 1000, - config = function() - require "custom/colorschemes" - end, -} - diff --git a/lua/custom/plugins/completion.lua b/lua/custom/plugins/completion.lua deleted file mode 100644 index 2628a4c..0000000 --- a/lua/custom/plugins/completion.lua +++ /dev/null @@ -1,20 +0,0 @@ -return { - "hrsh7th/nvim-cmp", - event = "InsertEnter", -- Only load plugin when in INSERT mode - dependencies = { - "hrsh7th/cmp-buffer", -- source for text in buffer - "hrsh7th/cmp-path", -- source for file system paths - { - "L3MON4D3/LuaSnip", - -- follow latest release. - version = "v2.*", -- Replace by the latest released major (first number of latest release) - }, - "saadparwaiz1/cmp_luasnip", -- for autocompletion - "rafamadriz/friendly-snippets", -- useful snippets - "onsails/lspkind.nvim", -- vs-code like pictograms - "hrsh7th/cmp-nvim-lsp", - }, - config = function() - require "custom/completion" - end, -} diff --git a/lua/custom/plugins/dressing.lua b/lua/custom/plugins/dressing.lua deleted file mode 100644 index feadb27..0000000 --- a/lua/custom/plugins/dressing.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - "stevearc/dressing.nvim", - event = "VeryLazy" -} diff --git a/lua/custom/plugins/fzf_lua.lua b/lua/custom/plugins/fzf_lua.lua deleted file mode 100644 index e363d16..0000000 --- a/lua/custom/plugins/fzf_lua.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - "ibhagwan/fzf-lua", - dependencies = { "nvim-tree/nvim-web-devicons" }, - opts = {}, - config = function() - require "custom.fzf_lua" - end - -} diff --git a/lua/custom/plugins/lsp.lua b/lua/custom/plugins/lsp.lua deleted file mode 100644 index 022c2eb..0000000 --- a/lua/custom/plugins/lsp.lua +++ /dev/null @@ -1,35 +0,0 @@ -return { - { - "neovim/nvim-lspconfig", - dependencies = { - { - --`lazydev` configures Lua LSP for your Neovim config, runtime and plugins - -- used for completion, annotations and signatures of Neovim apis - "folke/lazydev.nvim", - ft = "lua", - opts = { - library = { - -- Load luvit types when the `vim.uv` word is found - { path = "luvit-meta/library", words = { "vim%.uv" } }, - }, - }, - }, - { "Bilal2453/luvit-meta", lazy = true }, - "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim", - "WhoIsSethDaniel/mason-tool-installer.nvim", - - -- Some enhancements for notifications in bottom-right corner - { "j-hui/fidget.nvim", opts = {} }, - - -- Following plugin enables enhancements for diagnostics info - -- { "https://git.sr.ht/~whynothugo/lsp_lines.nvim" }, - - -- Autoformatting - "stevearc/conform.nvim", - }, - config = function() - require "custom/lsp" - end, - }, -} diff --git a/lua/custom/plugins/lualine.lua b/lua/custom/plugins/lualine.lua deleted file mode 100644 index 03460e3..0000000 --- a/lua/custom/plugins/lualine.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "nvim-lualine/lualine.nvim", - dependencies = { "nvim-tree/nvim-web-devicons" }, - config = function() - require "custom/lualine" - end, -} diff --git a/lua/custom/plugins/luasnip.lua b/lua/custom/plugins/luasnip.lua deleted file mode 100644 index 99006fc..0000000 --- a/lua/custom/plugins/luasnip.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - { - "L3MON4D3/LuaSnip", - -- follow latest release. - version = "v2.*", -- Replace by the latest released major (first number of latest release) - -- install jsregexp (optional!). - build = "make install_jsregexp" - } -} diff --git a/lua/custom/plugins/markdown_preview.lua b/lua/custom/plugins/markdown_preview.lua deleted file mode 100644 index 6f124b8..0000000 --- a/lua/custom/plugins/markdown_preview.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - "iamcco/markdown-preview.nvim", - cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, - build = "cd app && npm install && git restore .", - -- or if you use yarn: (I have not checked this, I use npm) - -- build = "cd app && yarn install && git restore .", - init = function() - vim.g.mkdp_filetypes = { "markdown" } - end, - ft = { "markdown" }, -} diff --git a/lua/custom/plugins/neogen.lua b/lua/custom/plugins/neogen.lua deleted file mode 100644 index 1f0174e..0000000 --- a/lua/custom/plugins/neogen.lua +++ /dev/null @@ -1,12 +0,0 @@ --- Plugin for generating annotations -return { - { - "danymat/neogen", - config = true, - -- Uncomment next line if you want to follow only stable versions - version = "*", - config = function() - require "custom/neogen" - end, - } -} diff --git a/lua/custom/plugins/obsidian.lua b/lua/custom/plugins/obsidian.lua deleted file mode 100644 index 0f9377d..0000000 --- a/lua/custom/plugins/obsidian.lua +++ /dev/null @@ -1,16 +0,0 @@ -if vim.g.obsidian_enabled then - return { - "epwalsh/obsidian.nvim", - version = "*", - lazy = true, - ft = "markdown", - dependencies = { - "nvim-lua/plenary.nvim", - }, - config = function() - require "custom.obsidian" - end - } -else - return {} -end diff --git a/lua/custom/plugins/oil.lua b/lua/custom/plugins/oil.lua deleted file mode 100644 index 96156df..0000000 --- a/lua/custom/plugins/oil.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - "stevearc/oil.nvim", - dependencies = { { "echasnovski/mini.icons", opts = {} } }, - config = function() - require "custom/oil" - end, -} - diff --git a/lua/custom/plugins/telescope.lua b/lua/custom/plugins/telescope.lua deleted file mode 100644 index 68acb53..0000000 --- a/lua/custom/plugins/telescope.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { - "nvim-telescope/telescope.nvim", - enabled = false, - dependencies = { - { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", - "folke/todo-comments.nvim", - }, - config = function() - require "custom.telescope" - end -} diff --git a/lua/custom/plugins/tmux_navigator.lua b/lua/custom/plugins/tmux_navigator.lua deleted file mode 100644 index b1b48a6..0000000 --- a/lua/custom/plugins/tmux_navigator.lua +++ /dev/null @@ -1,19 +0,0 @@ -return { - "christoomey/vim-tmux-navigator", - cmd = { - "TmuxNavigateLeft", - "TmuxNavigateDown", - "TmuxNavigateUp", - "TmuxNavigateRight", - "TmuxNavigatePrevious", - "TmuxNavigatorProcessList", - }, - keys = { - { "", "TmuxNavigateLeft" }, - { "", "TmuxNavigateDown" }, - { "", "TmuxNavigateUp" }, - { "", "TmuxNavigateRight" }, - { "", "TmuxNavigatePrevious" }, - }, -} --- return {} diff --git a/lua/custom/plugins/todo.lua b/lua/custom/plugins/todo.lua deleted file mode 100644 index 76b7eee..0000000 --- a/lua/custom/plugins/todo.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - "folke/todo-comments.nvim", - event = { "BufReadPre", "BufNewFile" }, - dependencies = { "nvim-lua/plenary.nvim" }, - config = function() - require "custom/todo" - end, -} diff --git a/lua/custom/plugins/treesitter.lua b/lua/custom/plugins/treesitter.lua deleted file mode 100644 index 2b2979a..0000000 --- a/lua/custom/plugins/treesitter.lua +++ /dev/null @@ -1,14 +0,0 @@ -return { - "nvim-treesitter/nvim-treesitter", - -- open this plugin on two events: - -- BufReadPre - open existing file - -- BufNewFile - open new file - event = { "BufReadPre", "BufNewFile" }, - build = ":TSUpdate", -- Run whenever this plugin is installed or updated - dependencies = { - "windwp/nvim-ts-autotag", -- Auto-closing functionality within treesitter - }, - config = function() - require "custom/treesitter" - end, -} diff --git a/lua/custom/plugins/trouble.lua b/lua/custom/plugins/trouble.lua deleted file mode 100644 index fe73a96..0000000 --- a/lua/custom/plugins/trouble.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - { - "folke/trouble.nvim", - opts = {}, -- for default options, refer to the configuration section for custom setup. - cmd = "Trouble", - config = function() - require "custom/trouble" - end, - }, -} diff --git a/lua/custom/plugins/which_key.lua b/lua/custom/plugins/which_key.lua deleted file mode 100644 index f2cff19..0000000 --- a/lua/custom/plugins/which_key.lua +++ /dev/null @@ -1,20 +0,0 @@ -return { - "folke/which-key.nvim", - -- Telling nvim that it can load this plugin later, and that it is not - -- that important for initial UI - event = "VeryLazy", - -- Function that will run while neovim startup instead of when plugin is actualy loads - init = function() - -- How long which-key will wait until activation - vim.o.timeout = true - vim.o.timeoutlen = 500 - end, - -- Options that will pass to setup function, but we are leaving it empty to use - -- default configuration - opts = { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - } -} - diff --git a/lua/custom/telescope.lua b/lua/custom/telescope.lua deleted file mode 100644 index dc69dba..0000000 --- a/lua/custom/telescope.lua +++ /dev/null @@ -1,133 +0,0 @@ -require("telescope").setup { - defaults = { - vimgrep_arguments = { - "rg", - "--color=never", - "--no-heading", - "--with-filename", - "--line-number", - "--column", - "--smart-case", - }, - path_display = { shorten = 4 }, - }, -} - --- Load fzf extension to imporve performance -pcall(require("telescope").load_extension, "fzf") - --- Glob pattern searcher -local function live_grep_with_glob() - vim.ui.input({ - prompt = "Glob pattern: ", - default = "/home/user/Work/root/ivideon/audio_storage/", -- Optional default value - }, function(input) - if input then - require('telescope.builtin').live_grep({ - -- glob_pattern = input, - search_dirs = { input } - }) - end - end) -end - -local function live_grep_in_current_dir() - -- Get currentp path - local search_dirs = { vim.fn.expand('%:p') } - -- Extract path from table - local current_dir = search_dirs[1] - -- Get path, cutting last entry (current file) - local result = current_dir:match(".*/") - vim.ui.input({ - prompt = "Glob pattern: ", - default = result, -- Optional default value - }, function(input) - if input then - require('telescope.builtin').live_grep({ - search_dirs = { input } - }) - end - end) -end - --- Function for copying current file path -local function copy_current_file_path() - local filepath = vim.fn.expand('%:p') - vim.fn.setreg("+", filepath) - print("Copied: " .. filepath) -end - --- Function for gettings snapshot of current cursor position -local function copy_file_path_and_position() - local filepath = vim.fn.expand('%:p') - local cursor_pos = vim.api.nvim_win_get_cursor(0) - local line = cursor_pos[1] - local col = cursor_pos[2] - - local output = string.format("%s:%d:%d", filepath, line, col) - - vim.fn.setreg("+", output) - - print("Copied: " .. output) -end - --- Function for getting filename and copy it to + buffer -local function copy_filename() - local filepath = vim.fn.expand('%:t') - local output = string.format("%s", filepath) - vim.fn.setreg("+", output) - print("Copied: " .. output) -end - - -local builtin = require("telescope.builtin") -local keymap = vim.keymap - --- Live grep in quickfix list -local function live_grep_in_quick_fix_list_files() - builtin.live_grep({ - search_dirs = vim.fn.getqflist({ items = 0 }).items - and vim.tbl_map(function(item) - return vim.fn.bufname(item.bufnr) - end, vim.fn.getqflist()) - or nil - }) -end - --- Find files with hidden included -local function find_files_with_hidden_included() - require('telescope.builtin').find_files({ - hidden = true, - no_ignore = true, - }) -end - --- Create a Neovim command -vim.api.nvim_create_user_command('TelescopeGrepGlob', live_grep_with_glob, {}) - -keymap.set("n", "ff", builtin.find_files, { desc = "FZF: find files in cwd" }) -keymap.set("n", "fml", builtin.marks, { desc = "FZF: find marks list" }) -keymap.set("n", "fmp", builtin.man_pages, { desc = "FZF: find available man pages" }) -keymap.set("n", "fg", builtin.live_grep, { desc = "FZF: find string in cwd" }) -keymap.set("n", "fs", builtin.grep_string, { desc = "FZF: find string under cursor" }) -keymap.set("n", "fb", builtin.buffers, { desc = "FZF: display opened buffers" }) -keymap.set("n", "fh", builtin.help_tags, { desc = "FZF: display help tags" }) -keymap.set("n", "ft", "TodoTelescope", { desc = "FZF: display TODO comments" }) -keymap.set("n", "fds", builtin.lsp_document_symbols, { desc = "Grep: Document symbols" }) -keymap.set('n', 'fp', live_grep_with_glob, { desc = 'Live grep with glob pattern' }) -keymap.set('n', 'fcp', live_grep_in_current_dir, { desc = 'Live grep in current directory' }) -keymap.set('n', 'ccp', copy_file_path_and_position, { desc = "Copy cursor position" }) -keymap.set('n', 'ccf', copy_filename, { desc = "Copy only filename" }) -keymap.set('n', 'ccd', copy_current_file_path, { desc = 'Live grep in current directory' }) -keymap.set('n', 'fq', live_grep_in_quick_fix_list_files, { desc = "Live grep in quickfix files" }) -keymap.set('n', 'fa', find_files_with_hidden_included, { desc = "Find all files (hidden + no ignore)" }) - --- Live grep in current file -vim.keymap.set('n', 'fcf', function() - require('telescope.builtin').live_grep({ - search_dirs = { vim.fn.expand('%:p') }, -- Current file's full path - -- disable_coordinates = true, -- Hide line/column numbers - -- fname_width = 0, -- Hide filename column - path_display = { 'hidden' }, - }) -end, { desc = 'Live grep in current file' }) diff --git a/lua/custom/todo.lua b/lua/custom/todo.lua deleted file mode 100644 index e10a301..0000000 --- a/lua/custom/todo.lua +++ /dev/null @@ -1,12 +0,0 @@ -local todo_comments = require("todo-comments") -local keymap = vim.keymap - -keymap.set("n", "]t", function() - todo_comments.jump_next() -end, { desc = "Next todo comment" }) - -keymap.set("n", "[t", function() - todo_comments.jump_prev() -end, { desc = "Previous todo comment" }) - -todo_comments.setup(opts) diff --git a/lua/custom/treesitter.lua b/lua/custom/treesitter.lua deleted file mode 100644 index fa58260..0000000 --- a/lua/custom/treesitter.lua +++ /dev/null @@ -1,16 +0,0 @@ -require 'nvim-treesitter.configs'.setup { - ensure_installed = { - "python", - "lua", - "vim", - "vimdoc", - "query", - "javascript", - "html", - "go", - "markdown", - }, - sync_install = false, - highlight = { enable = true }, - indent = { enable = true }, -} diff --git a/lua/custom/trouble.lua b/lua/custom/trouble.lua deleted file mode 100644 index 3854da9..0000000 --- a/lua/custom/trouble.lua +++ /dev/null @@ -1,38 +0,0 @@ -local trouble = require("trouble") - --- Setup Trouble -trouble.setup() - --- Keybindings -vim.keymap.set("n", "xx", "Trouble diagnostics toggle", { desc = "Diagnostics (Trouble)" }) -vim.keymap.set("n", "xX", "Trouble diagnostics toggle filter.buf=0", - { desc = "Buffer Diagnostics (Trouble)" }) -vim.keymap.set("n", "cs", "Trouble symbols toggle focus=false", { desc = "Symbols (Trouble)" }) -vim.keymap.set("n", "cl", "Trouble lsp toggle focus=false win.position=right", - { desc = "LSP Definitions / references / ... (Trouble)" }) -vim.keymap.set("n", "xL", "Trouble loclist toggle", { desc = "Location List (Trouble)" }) -vim.keymap.set("n", "xQ", "Trouble qflist toggle", { desc = "Quickfix List (Trouble)" }) - --- Telescope integration --- local actions = require("telescope.actions") --- local add_to_trouble = require("trouble.sources.telescope").add -local ok, telescope = pcall(require, "telescope") -if ok then - local open_with_trouble = require("trouble.sources.telescope").open - telescope.setup({ - defaults = { - mappings = { - i = { [""] = open_with_trouble }, - n = { [""] = open_with_trouble }, - }, - }, - }) -end - --- For fzf-lua settings -local ok_fzf, fzf_lua_config = pcall(require, "fzf-lua.config") -if ok_fzf then - local actions = require("trouble.sources.fzf").actions - fzf_lua_config.defaults.actions.files["ctrl-t"] = actions.open -end - diff --git a/main.py b/main.py deleted file mode 100644 index 8b13789..0000000 --- a/main.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/neovim b/neovim new file mode 160000 index 0000000..fc7e5cf --- /dev/null +++ b/neovim @@ -0,0 +1 @@ +Subproject commit fc7e5cf6c93fef08effc183087a2c8cc9bf0d75a diff --git a/nvim-pack-lock.json b/nvim-pack-lock.json new file mode 100644 index 0000000..6d2af38 --- /dev/null +++ b/nvim-pack-lock.json @@ -0,0 +1,117 @@ +{ + "plugins": { + "LuaSnip": { + "rev": "642b0c595e11608b4c18219e93b88d7637af27bc", + "src": "https://github.com/L3MON4D3/LuaSnip" + }, + "blink.cmp": { + "rev": "b4b7cbb52bab6c716b317433fa9348a070cccee5", + "src": "https://github.com/Saghen/blink.cmp", + "version": "'v1.*'" + }, + "cmp-buffer": { + "rev": "b74fab3656eea9de20a9b8116afa3cfc4ec09657", + "src": "https://github.com/hrsh7th/cmp-buffer" + }, + "cmp-nvim-lsp": { + "rev": "cbc7b02bb99fae35cb42f514762b89b5126651ef", + "src": "https://github.com/hrsh7th/cmp-nvim-lsp" + }, + "cmp-path": { + "rev": "c642487086dbd9a93160e1679a1327be111cbc25", + "src": "https://github.com/hrsh7th/cmp-path" + }, + "cmp_luasnip": { + "rev": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90", + "src": "https://github.com/saadparwaiz1/cmp_luasnip" + }, + "everforest": { + "rev": "b03a03148c8b34c24c96960b93da9c8883d11f54", + "src": "https://github.com/sainnhe/everforest" + }, + "friendly-snippets": { + "rev": "6cd7280adead7f586db6fccbd15d2cac7e2188b9", + "src": "https://github.com/rafamadriz/friendly-snippets" + }, + "fzf-lua": { + "rev": "8f5a5ae708451adc3e2ac4d965ac3452dc3ce5a6", + "src": "https://github.com/ibhagwan/fzf-lua" + }, + "gruvbox-baby": { + "rev": "bd52e62d8134647090108189e69c8b3cd18bdbbf", + "src": "https://github.com/luisiacc/gruvbox-baby" + }, + "gruvbox-material": { + "rev": "afb275d8e6dc379762d122bd24e1773fc057abf3", + "src": "https://github.com/sainnhe/gruvbox-material" + }, + "gruvbox.nvim": { + "rev": "334d5fd49fc8033f26408425366c66c6390c57bb", + "src": "https://github.com/ellisonleao/gruvbox.nvim" + }, + "kanagawa.nvim": { + "rev": "aef7f5cec0a40dbe7f3304214850c472e2264b10", + "src": "https://github.com/rebelot/kanagawa.nvim" + }, + "lspkind.nvim": { + "rev": "c7274c48137396526b59d86232eabcdc7fed8a32", + "src": "https://github.com/onsails/lspkind.nvim" + }, + "lualine.nvim": { + "rev": "8811f3f3f4dc09d740c67e9ce399e7a541e2e5b2", + "src": "https://github.com/nvim-lualine/lualine.nvim" + }, + "mason.nvim": { + "rev": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65", + "src": "https://github.com/mason-org/mason.nvim" + }, + "mini.completion": { + "rev": "09884c629cac1a8c999ffb6c57dc8424450aea5e", + "src": "https://github.com/nvim-mini/mini.completion" + }, + "neogen": { + "rev": "23e7e9f883d01289ebd90e98025acc860ea26366", + "src": "https://github.com/danymat/neogen" + }, + "nvim": { + "rev": "16408d203973da7e43fab87c6f9d3bf7fa98fa8b", + "src": "https://github.com/catppuccin/nvim" + }, + "nvim-cmp": { + "rev": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca", + "src": "https://github.com/hrsh7th/nvim-cmp" + }, + "nvim-lspconfig": { + "rev": "9ccd58a7949091c0cc2777d4e92a45a209c808c1", + "src": "https://github.com/neovim/nvim-lspconfig" + }, + "nvim-treesitter": { + "rev": "4916d6592ede8c07973490d9322f187e07dfefac", + "src": "https://github.com/nvim-treesitter/nvim-treesitter" + }, + "oil.nvim": { + "rev": "0fcc83805ad11cf714a949c98c605ed717e0b83e", + "src": "https://github.com/stevearc/oil.nvim" + }, + "snacks.nvim": { + "rev": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e", + "src": "https://github.com/folke/snacks.nvim" + }, + "todo-comments.nvim": { + "rev": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668", + "src": "https://github.com/folke/todo-comments.nvim" + }, + "tokyonight.nvim": { + "rev": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6", + "src": "https://github.com/folke/tokyonight.nvim" + }, + "vim-tmux-navigator": { + "rev": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432", + "src": "https://github.com/christoomey/vim-tmux-navigator" + }, + "which-key.nvim": { + "rev": "3aab2147e74890957785941f0c1ad87d0a44c15a", + "src": "https://github.com/folke/which-key.nvim" + } + } +} diff --git a/lua/custom/snippets/README.md b/snippets/README.md similarity index 100% rename from lua/custom/snippets/README.md rename to snippets/README.md diff --git a/lua/custom/snippets/all.lua b/snippets/all.lua similarity index 100% rename from lua/custom/snippets/all.lua rename to snippets/all.lua diff --git a/lua/custom/snippets/lua.lua b/snippets/lua.lua similarity index 100% rename from lua/custom/snippets/lua.lua rename to snippets/lua.lua diff --git a/lua/custom/snippets/markdown.lua b/snippets/markdown.lua similarity index 100% rename from lua/custom/snippets/markdown.lua rename to snippets/markdown.lua diff --git a/lua/custom/snippets/python.lua b/snippets/python.lua similarity index 100% rename from lua/custom/snippets/python.lua rename to snippets/python.lua