From f549b63062b4f92b730f5486f65e19d364993138 Mon Sep 17 00:00:00 2001 From: foozzi Date: Tue, 9 Jan 2024 14:40:47 -0500 Subject: [PATCH] 09012024 stylua --- linux/.config/nvim/lazy-lock.json | 1 + linux/.config/nvim/lua/core/lazy.lua | 16 +- linux/.config/nvim/lua/core/options.lua | 5 +- linux/.config/nvim/lua/plugins/comment.lua | 18 +- linux/.config/nvim/lua/plugins/conform.lua | 38 +-- .../nvim/lua/plugins/hardtime-nvim.lua | 12 +- linux/.config/nvim/lua/plugins/init.lua | 28 +- linux/.config/nvim/lua/plugins/lsp.lua | 311 ++++++++++-------- .../.config/nvim/lua/plugins/lualine-nvim.lua | 114 +++---- linux/.config/nvim/lua/plugins/neoscroll.lua | 10 +- .../nvim/lua/plugins/nvim-bufferline.lua | 12 + linux/.config/nvim/lua/plugins/nvim-lint.lua | 25 +- linux/.config/nvim/lua/plugins/nvim-tree.lua | 14 +- .../nvim/lua/plugins/nvim-web-devicons.lua | 2 +- .../nvim/lua/plugins/tmux-navigator.lua | 4 +- linux/.config/nvim/lua/plugins/tokyonight.lua | 14 +- .../.config/nvim/lua/plugins/trouble-nvim.lua | 110 +++---- linux/.config/nvim/lua/utils/init.lua | 36 +- linux/.gnupg/gpg-agent.conf | Bin 92 -> 96 bytes 19 files changed, 406 insertions(+), 364 deletions(-) create mode 100644 linux/.config/nvim/lua/plugins/nvim-bufferline.lua diff --git a/linux/.config/nvim/lazy-lock.json b/linux/.config/nvim/lazy-lock.json index 445ac5f..25d17dd 100644 --- a/linux/.config/nvim/lazy-lock.json +++ b/linux/.config/nvim/lazy-lock.json @@ -1,6 +1,7 @@ { "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, "LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" }, + "bufferline.nvim": { "branch": "main", "commit": "e48ce1805697e4bb97bc171c081e849a65859244" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, diff --git a/linux/.config/nvim/lua/core/lazy.lua b/linux/.config/nvim/lua/core/lazy.lua index f294fed..666ce95 100644 --- a/linux/.config/nvim/lua/core/lazy.lua +++ b/linux/.config/nvim/lua/core/lazy.lua @@ -1,13 +1,13 @@ local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) diff --git a/linux/.config/nvim/lua/core/options.lua b/linux/.config/nvim/lua/core/options.lua index b5588dd..ffa66d8 100644 --- a/linux/.config/nvim/lua/core/options.lua +++ b/linux/.config/nvim/lua/core/options.lua @@ -26,8 +26,7 @@ opt.scrolloff = 10 opt.completeopt = "menuone,noinsert,noselect" -- opt.guicursor = "" opt.showmode = false -opt.tabline = '%!v:lua.require("utils").tabline()' - +-- opt.tabline = '%!v:lua.require("utils").tabline()' -- Behaviour opt.hidden = true @@ -47,4 +46,4 @@ opt.modifiable = true -- opt.guicursor = -- "n-v-c:block,i-ci-ve:block,r-cr:hor20,o:hor50,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor,sm:block-blinkwait175-blinkoff150-blinkon175" opt.encoding = "UTF-8" -opt.cursorline = true +opt.cursorline = false diff --git a/linux/.config/nvim/lua/plugins/comment.lua b/linux/.config/nvim/lua/plugins/comment.lua index c7f8348..babb8b3 100644 --- a/linux/.config/nvim/lua/plugins/comment.lua +++ b/linux/.config/nvim/lua/plugins/comment.lua @@ -1,17 +1,17 @@ local config = function() - require('ts_context_commentstring').setup { - enable_autocmd = false, - } - require('Comment').setup { - pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(), - } + require("ts_context_commentstring").setup({ + enable_autocmd = false, + }) + require("Comment").setup({ + pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(), + }) end return { "numToStr/Comment.nvim", opts = config, lazy = false, - dependencies = { - {"JoosepAlviste/nvim-ts-context-commentstring"} - } + dependencies = { + { "JoosepAlviste/nvim-ts-context-commentstring" }, + }, } diff --git a/linux/.config/nvim/lua/plugins/conform.lua b/linux/.config/nvim/lua/plugins/conform.lua index 7b18965..90a5eb4 100644 --- a/linux/.config/nvim/lua/plugins/conform.lua +++ b/linux/.config/nvim/lua/plugins/conform.lua @@ -1,21 +1,21 @@ return { - 'stevearc/conform.nvim', - opts = { - formatters_by_ft = { - lua = { "stylua" }, - python = { "ruff_format", "ruff_fix" }, - javascript = { "biome" }, - typescript = { "biome" }, - javascriptreact = { "biome" }, - typescriptreact = { "biome" }, - json = { "biome" }, - sh = { "shfmt" }, - ['*'] = { 'trim_whitespace', 'codespell' }, - }, - format_on_save = { - timeout_ms = 500, - lsp_fallback = true, - }, - }, - lazy = false, + "stevearc/conform.nvim", + opts = { + formatters_by_ft = { + lua = { "stylua" }, + python = { "ruff_format", "ruff_fix" }, + javascript = { "biome" }, + typescript = { "biome" }, + javascriptreact = { "biome" }, + typescriptreact = { "biome" }, + json = { "biome" }, + sh = { "shfmt" }, + ["*"] = { "trim_whitespace", "codespell" }, + }, + format_on_save = { + timeout_ms = 500, + lsp_fallback = true, + }, + }, + lazy = false, } diff --git a/linux/.config/nvim/lua/plugins/hardtime-nvim.lua b/linux/.config/nvim/lua/plugins/hardtime-nvim.lua index ef61172..a5f394f 100644 --- a/linux/.config/nvim/lua/plugins/hardtime-nvim.lua +++ b/linux/.config/nvim/lua/plugins/hardtime-nvim.lua @@ -1,8 +1,8 @@ return { - "m4xshen/hardtime.nvim", - dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" }, - opts = { - max_time = 0, - }, - lazy = false + "m4xshen/hardtime.nvim", + dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" }, + opts = { + max_time = 0, + }, + lazy = false, } diff --git a/linux/.config/nvim/lua/plugins/init.lua b/linux/.config/nvim/lua/plugins/init.lua index 435838e..040479d 100644 --- a/linux/.config/nvim/lua/plugins/init.lua +++ b/linux/.config/nvim/lua/plugins/init.lua @@ -1,16 +1,16 @@ return { - { - "folke/which-key.nvim", - event = "VeryLazy", - init = function() - vim.o.timeout = true - vim.o.timeoutlen = 900 - end, - opts = { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - } - }, - { "folke/neodev.nvim" }, + { + "folke/which-key.nvim", + event = "VeryLazy", + init = function() + vim.o.timeout = true + vim.o.timeoutlen = 900 + end, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + }, + }, + { "folke/neodev.nvim" }, } diff --git a/linux/.config/nvim/lua/plugins/lsp.lua b/linux/.config/nvim/lua/plugins/lsp.lua index 71dfdae..ba7ae3d 100644 --- a/linux/.config/nvim/lua/plugins/lsp.lua +++ b/linux/.config/nvim/lua/plugins/lsp.lua @@ -1,156 +1,187 @@ local config = function() - local lsp_zero = require 'lsp-zero' - local luasnip = require 'luasnip' - local diagnostic_signs = require("utils.icons").diagnostic_signs + local lsp_zero = require("lsp-zero") + local luasnip = require("luasnip") + local diagnostic_signs = require("utils.icons").diagnostic_signs - lsp_zero.on_attach(function(_, bufnr) - vim.diagnostic.config({ - virtual_text = false, -- disable virtual text - update_in_insert = true, - underline = true, - severity_sort = true, - float = { - focusable = true, - style = "minimal", - border = "rounded", - source = "always", + lsp_zero.on_attach(function(_, bufnr) + vim.diagnostic.config({ + virtual_text = false, -- disable virtual text + update_in_insert = true, + underline = true, + severity_sort = true, + float = { + focusable = true, + style = "minimal", + border = "rounded", + source = "always", - header = "", - prefix = "", - }, - }) + header = "", + prefix = "", + }, + }) - vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { - border = "rounded", - }) + vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { + border = "rounded", + }) - vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { - border = "rounded", - }) + vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { + border = "rounded", + }) - local opts = {buffer = bufnr, remap = false} + local opts = { buffer = bufnr, remap = false } - vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts) - vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts) - vim.keymap.set("n", "vws", function() vim.lsp.buf.workspace_symbol() end, opts) - vim.keymap.set("n", "vd", function() vim.diagnostic.open_float() end, opts) - vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts) - vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts) - vim.keymap.set("n", "ca", function() vim.lsp.buf.code_action() end, opts) - vim.keymap.set("n", "vrr", function() vim.lsp.buf.references() end, opts) - vim.keymap.set("n", "vrn", function() vim.lsp.buf.rename() end, opts) - vim.keymap.set("i", "", function() vim.lsp.buf.signature_help() end, opts) - vim.keymap.set("n", "gi", function() vim.lsp.buf.implementation() end, opts) - -- nvim-lint - vim.keymap.set("n", "li", function() require("lint").try_lint() end, opts) - -- conform - vim.keymap.set("n", "fr", function() require("conform").format({ bufnr = bufnr }) end, opts) - end) + vim.keymap.set("n", "gd", function() + vim.lsp.buf.definition() + end, opts) + vim.keymap.set("n", "K", function() + vim.lsp.buf.hover() + end, opts) + vim.keymap.set("n", "vws", function() + vim.lsp.buf.workspace_symbol() + end, opts) + vim.keymap.set("n", "vd", function() + vim.diagnostic.open_float() + end, opts) + vim.keymap.set("n", "[d", function() + vim.diagnostic.goto_next() + end, opts) + vim.keymap.set("n", "]d", function() + vim.diagnostic.goto_prev() + end, opts) + vim.keymap.set("n", "ca", function() + vim.lsp.buf.code_action() + end, opts) + vim.keymap.set("n", "vrr", function() + vim.lsp.buf.references() + end, opts) + vim.keymap.set("n", "vrn", function() + vim.lsp.buf.rename() + end, opts) + vim.keymap.set("i", "", function() + vim.lsp.buf.signature_help() + end, opts) + vim.keymap.set("n", "gi", function() + vim.lsp.buf.implementation() + end, opts) + -- nvim-lint + vim.keymap.set("n", "li", function() + require("lint").try_lint() + end, opts) + -- conform + vim.keymap.set("n", "fr", function() + require("conform").format({ bufnr = bufnr }) + end, opts) + end) - lsp_zero.set_sign_icons({ - error = diagnostic_signs.Error, - warn = diagnostic_signs.Warn, - hint = diagnostic_signs.Hint, - info = diagnostic_signs.Info - }) + lsp_zero.set_sign_icons({ + error = diagnostic_signs.Error, + warn = diagnostic_signs.Warn, + hint = diagnostic_signs.Hint, + info = diagnostic_signs.Info, + }) - require('mason').setup({}) - require('mason-lspconfig').setup({ - ensure_installed = { - "bashls", - "tsserver", - "pyright", - "lua_ls", - "jsonls", - "clangd", - "ruff_lsp", - "biome" -- will install for formatting only - }, - automatic_installation = true, - handlers = { - lsp_zero.default_setup, - lua_ls = function() - local lua_opts = lsp_zero.nvim_lua_ls() - require('lspconfig').lua_ls.setup(lua_opts) - end, - pyright = function() - require('lspconfig').pyright.setup({ - settings = { - python = { - analysis = { - typeCheckingMode = "off" - } - } - } - }) - end, - biome = function() -- use tsserver instead - return {} - end, - } - }) + require("mason").setup({}) + require("mason-lspconfig").setup({ + ensure_installed = { + "bashls", + "tsserver", + "pyright", + "lua_ls", + "jsonls", + "clangd", + "ruff_lsp", + "biome", -- will install for formatting only + }, + automatic_installation = true, + handlers = { + lsp_zero.default_setup, + lua_ls = function() + local lua_opts = lsp_zero.nvim_lua_ls() + require("lspconfig").lua_ls.setup(lua_opts) + end, + pyright = function() + require("lspconfig").pyright.setup({ + settings = { + python = { + analysis = { + typeCheckingMode = "off", + }, + }, + }, + }) + end, + biome = function() -- use tsserver instead + return {} + end, + }, + }) - local cmp = require('cmp') - local cmp_select = {behavior = cmp.SelectBehavior.Select} - require("luasnip/loaders/from_vscode").lazy_load() + local cmp = require("cmp") + local cmp_select = { behavior = cmp.SelectBehavior.Select } + require("luasnip/loaders/from_vscode").lazy_load() - cmp.setup({ - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - preselect = 'item', - completion = { - completeopt = 'menu,menuone,noinsert' - }, - sources = { - {name = 'luasnip'}, - {name = 'path'}, - {name = 'nvim_lsp'}, - {name = 'nvim_lua'}, - {name = 'buffer'}, - }, - formatting = lsp_zero.cmp_format(), - mapping = cmp.mapping.preset.insert({ - -- [''] = cmp.mapping.select_prev_item(cmp_select), - [''] = cmp.mapping.select_next_item(cmp_select), - [''] = cmp.mapping.select_next_item(cmp_select), - [''] = cmp.mapping.confirm({ select = true }), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping(function(fallback) - if luasnip.jumpable(1) then - luasnip.jump(1) - else - fallback() - end - end, {'i', 's'}), + cmp.setup({ + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + preselect = "item", + completion = { + completeopt = "menu,menuone,noinsert", + }, + sources = { + { name = "luasnip" }, + { name = "path" }, + { name = "nvim_lsp" }, + { name = "nvim_lua" }, + { name = "buffer" }, + }, + formatting = lsp_zero.cmp_format(), + mapping = cmp.mapping.preset.insert({ + -- [''] = cmp.mapping.select_prev_item(cmp_select), + [""] = cmp.mapping.select_next_item(cmp_select), + [""] = cmp.mapping.select_next_item(cmp_select), + [""] = cmp.mapping.confirm({ select = true }), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping(function(fallback) + if luasnip.jumpable(1) then + luasnip.jump(1) + else + fallback() + end + end, { "i", "s" }), - [''] = cmp.mapping(function(fallback) - if luasnip.jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, {'i', 's'}), - }), - }) + [""] = cmp.mapping(function(fallback) + if luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), + }), + }) end return { - "VonHeikemen/lsp-zero.nvim", - branch = 'v3.x', - config = config, - lazy = false, - dependencies = { - "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim", - "neovim/nvim-lspconfig", - "hrsh7th/nvim-cmp", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "saadparwaiz1/cmp_luasnip", - {"L3MON4D3/LuaSnip", version = "v2.*", build = "make install_jsregexp", dependencies={"rafamadriz/friendly-snippets"}}, - } + "VonHeikemen/lsp-zero.nvim", + branch = "v3.x", + config = config, + lazy = false, + dependencies = { + "williamboman/mason.nvim", + "williamboman/mason-lspconfig.nvim", + "neovim/nvim-lspconfig", + "hrsh7th/nvim-cmp", + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "saadparwaiz1/cmp_luasnip", + { + "L3MON4D3/LuaSnip", + version = "v2.*", + build = "make install_jsregexp", + dependencies = { "rafamadriz/friendly-snippets" }, + }, + }, } diff --git a/linux/.config/nvim/lua/plugins/lualine-nvim.lua b/linux/.config/nvim/lua/plugins/lualine-nvim.lua index 95bf236..241e72b 100644 --- a/linux/.config/nvim/lua/plugins/lualine-nvim.lua +++ b/linux/.config/nvim/lua/plugins/lualine-nvim.lua @@ -1,69 +1,69 @@ local config = { - options = { - icons_enabled = true, - theme = "auto", - globalstatus = true, - disabled_filetypes = { - statusline = {}, - winbar = {}, - }, - ignore_focus = {}, - component_separators = { left = "|", right = "|" }, - section_separators = { left = "", right = "" }, - refresh = { - statusline = 1000, - tabline = 1000, - winbar = 1000, - } - }, - sections = { - lualine_a = { "mode" }, - lualine_b = { "buffers" }, - lualine_x = { "diagnostics", "encoding", "fileformat", "filetype" }, - lualine_y = { "progress" }, - lualine_z = { "location" }, - lualine_c = {}, - }, - tabline = {}, - winbar = {}, - inactive_winbar = {}, - extensions = {} + options = { + icons_enabled = true, + theme = "auto", + globalstatus = true, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + component_separators = { left = "|", right = "|" }, + section_separators = { left = "", right = "" }, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + }, + }, + sections = { + lualine_a = { "mode" }, + lualine_b = { "" }, + lualine_x = { "diagnostics", "encoding", "fileformat", "filetype" }, + lualine_y = { "progress" }, + lualine_z = { "location" }, + lualine_c = {}, + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {}, } local function ins_left(component) - table.insert(config.sections.lualine_c, component) + table.insert(config.sections.lualine_c, component) end local function ins_right(component) - table.insert(config.sections.lualine_x, 1, component) + table.insert(config.sections.lualine_x, 1, component) end -ins_right { - -- Lsp server name . - function() - local msg = 'No Active Lsp' - local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype') - local clients = vim.lsp.get_active_clients() - if next(clients) == nil then - return msg - end - for _, client in ipairs(clients) do - local filetypes = client.config.filetypes - if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then - return client.name - end - end - return msg - end, - icon = ' LSP:', - color = { fg = '#ff6b6b' }, -} +ins_right({ + -- Lsp server name . + function() + local msg = "No Active Lsp" + local buf_ft = vim.api.nvim_buf_get_option(0, "filetype") + local clients = vim.lsp.get_active_clients() + if next(clients) == nil then + return msg + end + for _, client in ipairs(clients) do + local filetypes = client.config.filetypes + if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then + return client.name + end + end + return msg + end, + icon = " LSP:", + color = { fg = "#ff6b6b" }, +}) return { - "nvim-lualine/lualine.nvim", - lazy = false, - opts = config, - dependencies = { - "nvim-tree/nvim-web-devicons" - } + "nvim-lualine/lualine.nvim", + lazy = false, + opts = config, + dependencies = { + "nvim-tree/nvim-web-devicons", + }, } diff --git a/linux/.config/nvim/lua/plugins/neoscroll.lua b/linux/.config/nvim/lua/plugins/neoscroll.lua index 2b77da1..25b6c67 100644 --- a/linux/.config/nvim/lua/plugins/neoscroll.lua +++ b/linux/.config/nvim/lua/plugins/neoscroll.lua @@ -1,7 +1,7 @@ return { - "karb94/neoscroll.nvim", - config = function () - require('neoscroll').setup {} - end, - lazy = false, + "karb94/neoscroll.nvim", + config = function() + require("neoscroll").setup({}) + end, + lazy = false, } diff --git a/linux/.config/nvim/lua/plugins/nvim-bufferline.lua b/linux/.config/nvim/lua/plugins/nvim-bufferline.lua new file mode 100644 index 0000000..84d804c --- /dev/null +++ b/linux/.config/nvim/lua/plugins/nvim-bufferline.lua @@ -0,0 +1,12 @@ +local config = function() + require("bufferline").setup() +end + +return { + "akinsho/bufferline.nvim", + opts = config, + dependencies = { + "nvim-tree/nvim-web-devicons", + }, + lazy = false, +} diff --git a/linux/.config/nvim/lua/plugins/nvim-lint.lua b/linux/.config/nvim/lua/plugins/nvim-lint.lua index df56731..5b14161 100644 --- a/linux/.config/nvim/lua/plugins/nvim-lint.lua +++ b/linux/.config/nvim/lua/plugins/nvim-lint.lua @@ -1,19 +1,18 @@ local config = function() - require('lint').linters_by_ft = { - python = { "mypy" }, - } + require("lint").linters_by_ft = { + python = { "mypy" }, + } - vim.api.nvim_create_autocmd({ "BufWritePost" }, { - callback = function() - require("lint").try_lint() - end, - }) + vim.api.nvim_create_autocmd({ "BufWritePost" }, { + callback = function() + require("lint").try_lint() + end, + }) end - return { - "mfussenegger/nvim-lint", - opts = {}, - config = config, - lazy = false, + "mfussenegger/nvim-lint", + opts = {}, + config = config, + lazy = false, } diff --git a/linux/.config/nvim/lua/plugins/nvim-tree.lua b/linux/.config/nvim/lua/plugins/nvim-tree.lua index 23317eb..3816ac8 100644 --- a/linux/.config/nvim/lua/plugins/nvim-tree.lua +++ b/linux/.config/nvim/lua/plugins/nvim-tree.lua @@ -1,9 +1,9 @@ return { - "nvim-tree/nvim-tree.lua", - lazy = false, - opts = { - filters = { - dotfiles = false, - } - } + "nvim-tree/nvim-tree.lua", + lazy = false, + opts = { + filters = { + dotfiles = false, + }, + }, } diff --git a/linux/.config/nvim/lua/plugins/nvim-web-devicons.lua b/linux/.config/nvim/lua/plugins/nvim-web-devicons.lua index 537b4f5..025ad56 100644 --- a/linux/.config/nvim/lua/plugins/nvim-web-devicons.lua +++ b/linux/.config/nvim/lua/plugins/nvim-web-devicons.lua @@ -1,3 +1,3 @@ return { - 'nvim-tree/nvim-web-devicons' + "nvim-tree/nvim-web-devicons", } diff --git a/linux/.config/nvim/lua/plugins/tmux-navigator.lua b/linux/.config/nvim/lua/plugins/tmux-navigator.lua index 6efe1fe..767eafb 100644 --- a/linux/.config/nvim/lua/plugins/tmux-navigator.lua +++ b/linux/.config/nvim/lua/plugins/tmux-navigator.lua @@ -1,4 +1,4 @@ return { - "christoomey/vim-tmux-navigator", - lazy = false, + "christoomey/vim-tmux-navigator", + lazy = false, } diff --git a/linux/.config/nvim/lua/plugins/tokyonight.lua b/linux/.config/nvim/lua/plugins/tokyonight.lua index e5b265f..1c8083d 100644 --- a/linux/.config/nvim/lua/plugins/tokyonight.lua +++ b/linux/.config/nvim/lua/plugins/tokyonight.lua @@ -1,9 +1,9 @@ return { - "folke/tokyonight.nvim", - lazy = false, - priority = 1000, - opts = {}, - config = function() - vim.cmd('colorscheme tokyonight-storm') - end + "folke/tokyonight.nvim", + lazy = false, + priority = 1000, + opts = {}, + config = function() + vim.cmd("colorscheme tokyonight-storm") + end, } diff --git a/linux/.config/nvim/lua/plugins/trouble-nvim.lua b/linux/.config/nvim/lua/plugins/trouble-nvim.lua index 296f6cc..e5df95a 100644 --- a/linux/.config/nvim/lua/plugins/trouble-nvim.lua +++ b/linux/.config/nvim/lua/plugins/trouble-nvim.lua @@ -4,61 +4,61 @@ local maplazykey = require("utils.keymapper").maplazykey return { "folke/trouble.nvim", dependencies = { "nvim-tree/nvim-web-devicons" }, - opts = { - position = "bottom", -- position of the list can be: bottom, top, left, right - height = 10, -- height of the trouble list when position is top or bottom - width = 50, -- width of the list when position is left or right - icons = true, -- use devicons for filenames - mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist" - severity = nil, -- nil (ALL) or vim.diagnostic.severity.ERROR | WARN | INFO | HINT - fold_open = "", -- icon used for open folds - fold_closed = "", -- icon used for closed folds - group = true, -- group results by file - padding = true, -- add an extra new line on top of the list - cycle_results = true, -- cycle item list when reaching beginning or end of list - action_keys = { -- key mappings for actions in the trouble list - -- map to {} to remove a mapping, for example: - -- close = {}, - close = "q", -- close the list - cancel = "", -- cancel the preview and get back to your last window / buffer / cursor - refresh = "r", -- manually refresh - jump = { "", "", "<2-leftmouse>" }, -- jump to the diagnostic or open / close folds - open_split = { "" }, -- open buffer in new split - open_vsplit = { "" }, -- open buffer in new vsplit - open_tab = { "" }, -- open buffer in new tab - jump_close = {"o"}, -- jump to the diagnostic and close the list - toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode - switch_severity = "s", -- switch "diagnostics" severity filter level to HINT / INFO / WARN / ERROR - toggle_preview = "P", -- toggle auto_preview - hover = "K", -- opens a small popup with the full multiline message - preview = "p", -- preview the diagnostic location - open_code_href = "c", -- if present, open a URI with more information about the diagnostic error - close_folds = {"zM", "zm"}, -- close all folds - open_folds = {"zR", "zr"}, -- open all folds - toggle_fold = {"zA", "za"}, -- toggle fold of current file - previous = "k", -- previous item - next = "j", -- next item - help = "?" -- help menu - }, - multiline = true, -- render multi-line messages - indent_lines = true, -- add an indent guide below the fold icons - win_config = { border = "single" }, -- window configuration for floating windows. See |nvim_open_win()|. - auto_open = false, -- automatically open the list when you have diagnostics - auto_close = false, -- automatically close the list when you have no diagnostics - auto_preview = true, -- automatically preview the location of the diagnostic. to close preview and go back to last window - auto_fold = false, -- automatically fold a file trouble list at creation - auto_jump = {"lsp_definitions"}, -- for the given modes, automatically jump if there is only a single result - include_declaration = { "lsp_references", "lsp_implementations", "lsp_definitions" }, -- for the given modes, include the declaration of the current symbol in the results - signs = { - -- icons / text used for a diagnostic - error = diagnostic_signs.Error, - warning = diagnostic_signs.Warn, - hint = diagnostic_signs.Hint, - information = diagnostic_signs.Info, - other = diagnostic_signs.Info, - }, - use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client - }, + opts = { + position = "bottom", -- position of the list can be: bottom, top, left, right + height = 10, -- height of the trouble list when position is top or bottom + width = 50, -- width of the list when position is left or right + icons = true, -- use devicons for filenames + mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist" + severity = nil, -- nil (ALL) or vim.diagnostic.severity.ERROR | WARN | INFO | HINT + fold_open = "", -- icon used for open folds + fold_closed = "", -- icon used for closed folds + group = true, -- group results by file + padding = true, -- add an extra new line on top of the list + cycle_results = true, -- cycle item list when reaching beginning or end of list + action_keys = { -- key mappings for actions in the trouble list + -- map to {} to remove a mapping, for example: + -- close = {}, + close = "q", -- close the list + cancel = "", -- cancel the preview and get back to your last window / buffer / cursor + refresh = "r", -- manually refresh + jump = { "", "", "<2-leftmouse>" }, -- jump to the diagnostic or open / close folds + open_split = { "" }, -- open buffer in new split + open_vsplit = { "" }, -- open buffer in new vsplit + open_tab = { "" }, -- open buffer in new tab + jump_close = { "o" }, -- jump to the diagnostic and close the list + toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode + switch_severity = "s", -- switch "diagnostics" severity filter level to HINT / INFO / WARN / ERROR + toggle_preview = "P", -- toggle auto_preview + hover = "K", -- opens a small popup with the full multiline message + preview = "p", -- preview the diagnostic location + open_code_href = "c", -- if present, open a URI with more information about the diagnostic error + close_folds = { "zM", "zm" }, -- close all folds + open_folds = { "zR", "zr" }, -- open all folds + toggle_fold = { "zA", "za" }, -- toggle fold of current file + previous = "k", -- previous item + next = "j", -- next item + help = "?", -- help menu + }, + multiline = true, -- render multi-line messages + indent_lines = true, -- add an indent guide below the fold icons + win_config = { border = "single" }, -- window configuration for floating windows. See |nvim_open_win()|. + auto_open = false, -- automatically open the list when you have diagnostics + auto_close = false, -- automatically close the list when you have no diagnostics + auto_preview = true, -- automatically preview the location of the diagnostic. to close preview and go back to last window + auto_fold = false, -- automatically fold a file trouble list at creation + auto_jump = { "lsp_definitions" }, -- for the given modes, automatically jump if there is only a single result + include_declaration = { "lsp_references", "lsp_implementations", "lsp_definitions" }, -- for the given modes, include the declaration of the current symbol in the results + signs = { + -- icons / text used for a diagnostic + error = diagnostic_signs.Error, + warning = diagnostic_signs.Warn, + hint = diagnostic_signs.Hint, + information = diagnostic_signs.Info, + other = diagnostic_signs.Info, + }, + use_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client + }, keys = { maplazykey("xx", function() require("trouble").toggle() diff --git a/linux/.config/nvim/lua/utils/init.lua b/linux/.config/nvim/lua/utils/init.lua index 0e9ac58..6999d98 100644 --- a/linux/.config/nvim/lua/utils/init.lua +++ b/linux/.config/nvim/lua/utils/init.lua @@ -1,26 +1,26 @@ local M = {} function M.tabline() - local s = '' - for i = 1, vim.fn.tabpagenr('$') do - local winnr = vim.fn.tabpagewinnr(i) - local buflist = vim.fn.tabpagebuflist(i) - local bufnr = buflist[winnr] - local bufname = vim.fn.bufname(bufnr) - local filename = vim.fn.fnamemodify(bufname, ':t') - local icon = require'nvim-web-devicons'.get_icon(filename) + local s = "" + for i = 1, vim.fn.tabpagenr("$") do + local winnr = vim.fn.tabpagewinnr(i) + local buflist = vim.fn.tabpagebuflist(i) + local bufnr = buflist[winnr] + local bufname = vim.fn.bufname(bufnr) + local filename = vim.fn.fnamemodify(bufname, ":t") + local icon = require("nvim-web-devicons").get_icon(filename) - -- Отмечаем активный таб - if i == vim.fn.tabpagenr() then - s = s .. '%#TabLineSel#' - else - s = s .. '%#TabLine#' - end + -- Отмечаем активный таб + if i == vim.fn.tabpagenr() then + s = s .. "%#TabLineSel#" + else + s = s .. "%#TabLine#" + end - s = s .. ' ' .. (icon or '') .. ' ' .. filename .. ' ' - end - s = s .. '%#TabLineFill#%=' - return s + s = s .. " " .. (icon or "") .. " " .. filename .. " " + end + s = s .. "%#TabLineFill#%=" + return s end return M diff --git a/linux/.gnupg/gpg-agent.conf b/linux/.gnupg/gpg-agent.conf index 151ff8dd7b0d40d56d638ff2ae22fc6550b3f86d..0c707e580d4978cfacfb63de79da29fe253fa4c5 100644 GIT binary patch literal 96 zcmV-m0H6N=M@dveQdv+`0RK|cuc`98f{INfCc{v*mSH?w8zBSAE#WzfgWq@k_Jq!5 zje|+h9*=<^^I@!|b0h8EXn)^(@WPz`>el~M+2;(e->HG*QQ7E0n9CPjzSSnc_o&nM C4m6Me literal 92 zcmV-i0Hgl^M@dveQdv+`01lfafd9c0T(YQ+{#_`g(m$YL`21?rK_iP~dHj2V$~3|C yb17S89eG59ex!5r`ZiMnPNwv6M#WkpNunDG{l%U0yBK@zdikvyfbd$xqmRzFnk~!#