From ff494a0caaa666c93a37afd0f3c827e9facb3bf3 Mon Sep 17 00:00:00 2001 From: CRy386i Date: Sat, 28 Jun 2025 19:20:31 +0300 Subject: [PATCH 1/8] Add new plugins and refactor --- lazy-lock.json | 22 ----------------- lua/plugins/lazy.lua | 56 +++++++++++++++++++++++++++++--------------- 2 files changed, 37 insertions(+), 41 deletions(-) delete mode 100644 lazy-lock.json diff --git a/lazy-lock.json b/lazy-lock.json deleted file mode 100644 index e092218..0000000 --- a/lazy-lock.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "aerial.nvim": { "branch": "master", "commit": "24ebacab5821107c50f628e8e7774f105c08fe9b" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, - "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" }, - "gruvbox": { "branch": "master", "commit": "f1ecde848f0cdba877acb0c740320568252cc482" }, - "lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" }, - "nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" }, - "nvim-lspconfig": { "branch": "master", "commit": "b3014f2209503944f2714cf27c95591433a0c7d8" }, - "nvim-treesitter": { "branch": "master", "commit": "ef267f0c285928ea3a0d3362a260a0728fd4a146" }, - "plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, - "telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" }, - "tokyonight.nvim": { "branch": "main", "commit": "9bf9ec53d5e87b025e2404069b71e7ebdc3a13e5" }, - "vim-commentary": { "branch": "master", "commit": "c4b8f52cbb7142ec239494e5a2c4a512f92c4d07" }, - "vim-fugitive": { "branch": "master", "commit": "dac8e5c2d85926df92672bf2afb4fc48656d96c7" }, - "vim-polyglot": { "branch": "master", "commit": "bc8a81d3592dab86334f27d1d43c080ebf680d42" }, - "vim-vsnip": { "branch": "master", "commit": "02a8e79295c9733434aab4e0e2b8c4b7cea9f3a9" } -} \ No newline at end of file diff --git a/lua/plugins/lazy.lua b/lua/plugins/lazy.lua index 1a3de84..45dc2a8 100644 --- a/lua/plugins/lazy.lua +++ b/lua/plugins/lazy.lua @@ -33,11 +33,27 @@ require('lazy').setup({ }, { "folke/tokyonight.nvim", - lazy = true, - -- config = function() - -- -- load the colorscheme here - -- vim.cmd([[colorscheme tokyonight]]) - -- end, + lazy = true + }, + { + "folke/which-key.nvim", + event = "VeryLazy", + opts = { + preset = "modern", + icons = { + mappings = false, + rules = false + } + }, + keys = { + { + "?", + function() + require("which-key").show({ global = false }) + end, + desc = "Buffer Local Keymaps (which-key)", + }, + }, }, { 'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' @@ -49,8 +65,6 @@ require('lazy').setup({ local telescope = require('telescope') telescope.setup{ - -- defaults = { - -- } extensions = { fzf = { fuzzy = true, -- false will only do exact matching @@ -61,23 +75,24 @@ require('lazy').setup({ } } } - - --telescope.load_extension('fzy') telescope.load_extension('fzf') + local wk = require("which-key") local builtin = require('telescope.builtin') - vim.keymap.set('n', '', builtin.find_files, {}) - vim.keymap.set('n', 'ft', builtin.treesitter, {}) - vim.keymap.set('n', 'fg', builtin.live_grep, {}) - vim.keymap.set('n', 'fb', builtin.buffers, {}) - vim.keymap.set('n', 'fh', builtin.help_tags, {}) + wk.add({ + { '', builtin.find_files, desc = "Find file", mode = "n" }, + { 'ft', builtin.treesitter, desc = "Treesitter symbol", mode = "n" }, + { 'fg', builtin.live_grep, desc = "Live grep", mode = "n" }, + { 'fb', builtin.buffers, desc = "Search in buffers", mode = "n" }, + { 'fh', builtin.help_tags, desc = "Help search", mode = "n" } + }) end }, { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", config = function() require("nvim-treesitter.configs").setup { - ensure_installed = { "c", "cpp", "pascal", "lua", "glsl", "yaml" }, + ensure_installed = { "c", "cpp", "lua" }, highlight = { enable = true, } } end @@ -86,16 +101,19 @@ require('lazy').setup({ 'neovim/nvim-lspconfig', config = function() -- Setup language servers. + local wk = require("which-key") local lspconfig = require('lspconfig') --lspconfig.clangd.setup {} --lspconfig.neocmake.setup {} -- Global mappings. -- See `:help vim.diagnostic.*` for documentation on any of the below functions - vim.keymap.set('n', 'e', vim.diagnostic.open_float) - vim.keymap.set('n', '[d', vim.diagnostic.goto_prev) - vim.keymap.set('n', ']d', vim.diagnostic.goto_next) - vim.keymap.set('n', 'q', vim.diagnostic.setloclist) + wk.add({ + { 'e', vim.diagnostic.open_float, desc = "Open diagnostic window", mode = "n" }, + { '[d', vim.diagnostic.goto_prev, desc = "Previous diagnostic", mode = "n" }, + { ']d', vim.diagnostic.goto_next, desc = "Next diagnostic", mode = "n" }, + { 'q', vim.diagnostic.setloclist, desc = "Add buffer diagnostics to the location list", mode = "n" } + }) -- Use LspAttach autocommand to only map the following keys -- after the language server attaches to the current buffer From 82987a454c0510955eb828eb1fac5d7b8f6ae5b3 Mon Sep 17 00:00:00 2001 From: CRy386i Date: Fri, 11 Jul 2025 20:11:11 +0300 Subject: [PATCH 2/8] Oh my little refactor --- lua/base/other.lua | 26 +++++++++++++++++++ lua/plugins/lazy.lua | 59 +++++++++++++++----------------------------- 2 files changed, 46 insertions(+), 39 deletions(-) diff --git a/lua/base/other.lua b/lua/base/other.lua index 15c75fa..2df247a 100644 --- a/lua/base/other.lua +++ b/lua/base/other.lua @@ -35,3 +35,29 @@ opt.langmap = "ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKL opt.colorcolumn = "120" opt.mouse = "" + +vim.filetype.add({ + extension = { + vp = 'glsl', + fp = 'glsl', + gp = 'glsl', + vs = 'glsl', + fs = 'glsl', + gs = 'glsl', + tcs = 'glsl', + tes = 'glsl', + cs = 'glsl', + vert = 'glsl', + frag = 'glsl', + geom = 'glsl', + tess = 'glsl', + shd = 'glsl', + gls = 'glsl', + glsl = 'glsl', + rgen = 'glsl', + comp = 'glsl', + rchit = 'glsl', + rahit = 'glsl', + rmiss = 'glsl', + } +}) diff --git a/lua/plugins/lazy.lua b/lua/plugins/lazy.lua index 45dc2a8..1fd1ba8 100644 --- a/lua/plugins/lazy.lua +++ b/lua/plugins/lazy.lua @@ -71,7 +71,7 @@ require('lazy').setup({ override_generic_sorter = true, -- override the generic sorter override_file_sorter = true, -- override the file sorter case_mode = "smart_case", -- or "ignore_case" or "respect_case" - -- the default case_mode is "smart_case" + -- the default case_mode is "smart_case" } } } @@ -92,7 +92,7 @@ require('lazy').setup({ build = ":TSUpdate", config = function() require("nvim-treesitter.configs").setup { - ensure_installed = { "c", "cpp", "lua" }, + ensure_installed = { 'c', 'cpp', 'lua' }, highlight = { enable = true, } } end @@ -100,12 +100,25 @@ require('lazy').setup({ { 'neovim/nvim-lspconfig', config = function() - -- Setup language servers. - local wk = require("which-key") - local lspconfig = require('lspconfig') - --lspconfig.clangd.setup {} - --lspconfig.neocmake.setup {} + -- Setup language servers + -- Server-specific settings. See `:help lsp-quickstart` + vim.lsp.config('*', { + capabilities = { + textDocument = { + semanticTokens = { + multilineTokenSupport = true, + } + } + }, + root_markers = { '.git' }, + }) + vim.lsp.config('clangd', { + cmd = { 'clangd', '--background-index', '--clang-tidy', '--log=verbose', '--header-insertion=never' }, + filetypes = { 'c', 'cpp' } + }) + vim.lsp.enable('clangd') + local wk = require("which-key") -- Global mappings. -- See `:help vim.diagnostic.*` for documentation on any of the below functions wk.add({ @@ -228,13 +241,6 @@ require('lazy').setup({ { name = 'cmdline' } }) }) - - -- Set up lspconfig. - local capabilities = require('cmp_nvim_lsp').default_capabilities() - -- TODO Replace with each lsp server you've enabled. - --[[require('lspconfig')['clangd'].setup { - capabilities = capabilities - }--]] end, }, { @@ -255,28 +261,3 @@ require('lazy').setup({ } }) -vim.filetype.add({ - extension = { - vp = 'glsl', - fp = 'glsl', - gp = 'glsl', - vs = 'glsl', - fs = 'glsl', - gs = 'glsl', - tcs = 'glsl', - tes = 'glsl', - cs = 'glsl', - vert = 'glsl', - frag = 'glsl', - geom = 'glsl', - tess = 'glsl', - shd = 'glsl', - gls = 'glsl', - glsl = 'glsl', - rgen = 'glsl', - comp = 'glsl', - rchit = 'glsl', - rahit = 'glsl', - rmiss = 'glsl', - } -}) From 19925b92a99fa6808e04d157bafc7689deaced03 Mon Sep 17 00:00:00 2001 From: CRy386i Date: Sat, 19 Jul 2025 05:14:12 +0300 Subject: [PATCH 3/8] remove which-key --- lua/plugins/lazy.lua | 43 ++++++++----------------------------------- 1 file changed, 8 insertions(+), 35 deletions(-) diff --git a/lua/plugins/lazy.lua b/lua/plugins/lazy.lua index 1fd1ba8..2df6d6b 100644 --- a/lua/plugins/lazy.lua +++ b/lua/plugins/lazy.lua @@ -35,26 +35,6 @@ require('lazy').setup({ "folke/tokyonight.nvim", lazy = true }, - { - "folke/which-key.nvim", - event = "VeryLazy", - opts = { - preset = "modern", - icons = { - mappings = false, - rules = false - } - }, - keys = { - { - "?", - function() - require("which-key").show({ global = false }) - end, - desc = "Buffer Local Keymaps (which-key)", - }, - }, - }, { 'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }, @@ -77,15 +57,11 @@ require('lazy').setup({ } telescope.load_extension('fzf') - local wk = require("which-key") local builtin = require('telescope.builtin') - wk.add({ - { '', builtin.find_files, desc = "Find file", mode = "n" }, - { 'ft', builtin.treesitter, desc = "Treesitter symbol", mode = "n" }, - { 'fg', builtin.live_grep, desc = "Live grep", mode = "n" }, - { 'fb', builtin.buffers, desc = "Search in buffers", mode = "n" }, - { 'fh', builtin.help_tags, desc = "Help search", mode = "n" } - }) + vim.keymap.set('n', 'e', vim.diagnostic.open_float) + vim.keymap.set('n', '[d', vim.diagnostic.goto_prev) + vim.keymap.set('n', ']d', vim.diagnostic.goto_next) + vim.keymap.set('n', 'q', vim.diagnostic.setloclist) end }, { "nvim-treesitter/nvim-treesitter", @@ -118,15 +94,12 @@ require('lazy').setup({ }) vim.lsp.enable('clangd') - local wk = require("which-key") -- Global mappings. -- See `:help vim.diagnostic.*` for documentation on any of the below functions - wk.add({ - { 'e', vim.diagnostic.open_float, desc = "Open diagnostic window", mode = "n" }, - { '[d', vim.diagnostic.goto_prev, desc = "Previous diagnostic", mode = "n" }, - { ']d', vim.diagnostic.goto_next, desc = "Next diagnostic", mode = "n" }, - { 'q', vim.diagnostic.setloclist, desc = "Add buffer diagnostics to the location list", mode = "n" } - }) + vim.keymap.set('n', 'e', vim.diagnostic.open_float) + vim.keymap.set('n', '[d', vim.diagnostic.goto_prev) + vim.keymap.set('n', ']d', vim.diagnostic.goto_next) + vim.keymap.set('n', 'q', vim.diagnostic.setloclist) -- Use LspAttach autocommand to only map the following keys -- after the language server attaches to the current buffer From 3a2c83dfe22f51a6838bea519825b9e07ae66656 Mon Sep 17 00:00:00 2001 From: CRy386i Date: Mon, 21 Jul 2025 05:41:14 +0300 Subject: [PATCH 4/8] return hotkeys for telescope.fzf --- lua/plugins/lazy.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/plugins/lazy.lua b/lua/plugins/lazy.lua index 2df6d6b..8ceb3ad 100644 --- a/lua/plugins/lazy.lua +++ b/lua/plugins/lazy.lua @@ -58,10 +58,11 @@ require('lazy').setup({ telescope.load_extension('fzf') local builtin = require('telescope.builtin') - vim.keymap.set('n', 'e', vim.diagnostic.open_float) - vim.keymap.set('n', '[d', vim.diagnostic.goto_prev) - vim.keymap.set('n', ']d', vim.diagnostic.goto_next) - vim.keymap.set('n', 'q', vim.diagnostic.setloclist) + vim.keymap.set('n', '', builtin.find_files, {}) + vim.keymap.set('n', 'ft', builtin.treesitter, {}) + vim.keymap.set('n', 'fg', builtin.live_grep, {}) + vim.keymap.set('n', 'fb', builtin.buffers, {}) + vim.keymap.set('n', 'fh', builtin.help_tags, {}) end }, { "nvim-treesitter/nvim-treesitter", From 4e27af39cfd13196f1f7bd0b3a9feb607013607f Mon Sep 17 00:00:00 2001 From: cry386i Date: Thu, 31 Jul 2025 19:01:00 +0300 Subject: [PATCH 5/8] Setting nvim theme apply and now it's not be break --- lua/plugins/lazy.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/plugins/lazy.lua b/lua/plugins/lazy.lua index 8ceb3ad..8901cf9 100644 --- a/lua/plugins/lazy.lua +++ b/lua/plugins/lazy.lua @@ -26,8 +26,9 @@ require('lazy').setup({ lazy = false, priority = 1000, config = function() + vim.opt.termguicolors = false vim.opt.background = 'dark' - vim.g.gruvbox_italic = 1 + vim.g.gruvbox_italic = true vim.cmd([[colorscheme gruvbox]]) end, }, From 386b0c7fd3b4af8fce5a2cefc32e8c90f159f666 Mon Sep 17 00:00:00 2001 From: cry386i Date: Tue, 5 Aug 2025 21:31:56 +0300 Subject: [PATCH 6/8] Corrret a commets --- lua/plugins/lazy.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lazy.lua b/lua/plugins/lazy.lua index 8901cf9..fd64597 100644 --- a/lua/plugins/lazy.lua +++ b/lua/plugins/lazy.lua @@ -79,7 +79,7 @@ require('lazy').setup({ 'neovim/nvim-lspconfig', config = function() -- Setup language servers - -- Server-specific settings. See `:help lsp-quickstart` + -- Server-specific settings. See `:help lspconfig` vim.lsp.config('*', { capabilities = { textDocument = { From 9b513b789c6d76b96081e1cdcf25a3fa95c4d824 Mon Sep 17 00:00:00 2001 From: CRy386i Date: Sat, 9 Aug 2025 18:55:41 +0300 Subject: [PATCH 7/8] Again correct comment --- lua/plugins/lazy.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lazy.lua b/lua/plugins/lazy.lua index fd64597..79d6e10 100644 --- a/lua/plugins/lazy.lua +++ b/lua/plugins/lazy.lua @@ -79,7 +79,7 @@ require('lazy').setup({ 'neovim/nvim-lspconfig', config = function() -- Setup language servers - -- Server-specific settings. See `:help lspconfig` + -- Server-specific settings. See `:help lspconfig-all` vim.lsp.config('*', { capabilities = { textDocument = { From 117f2a86a6f89230eb24211a273bfcc0360c8b18 Mon Sep 17 00:00:00 2001 From: CRy386i Date: Sat, 20 Dec 2025 03:46:36 +0100 Subject: [PATCH 8/8] Fix trolling format file and mysterious themes --- lua/base/other.lua | 3 ++- lua/plugins/lazy.lua | 14 ++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/lua/base/other.lua b/lua/base/other.lua index 2df247a..658574b 100644 --- a/lua/base/other.lua +++ b/lua/base/other.lua @@ -27,7 +27,8 @@ vim.cmd [[autocmd BufEnter * set fo-=c fo-=r fo-=o]] opt.encoding = "utf-8" opt.fileencoding = "utf-8" -opt.ff = "unix" +opt.fileformats = "unix" +opt.fileformat = "unix" -- Also work under ru opt.langmap = "ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz" diff --git a/lua/plugins/lazy.lua b/lua/plugins/lazy.lua index 79d6e10..44a6d78 100644 --- a/lua/plugins/lazy.lua +++ b/lua/plugins/lazy.lua @@ -15,12 +15,6 @@ vim.opt.rtp:prepend(lazypath) require('lazy').setup({ { 'tpope/vim-commentary', }, { 'tpope/vim-fugitive', }, - { 'sheerun/vim-polyglot', - init = function() - -- vim-polyglot confusingly registers *.comp both for perl and for glsl - vim.api.nvim_set_var('polyglot_disabled', {'perl'}) - end, - }, { 'morhetz/gruvbox', lazy = false, @@ -32,10 +26,10 @@ require('lazy').setup({ vim.cmd([[colorscheme gruvbox]]) end, }, - { - "folke/tokyonight.nvim", - lazy = true - }, + -- { + -- "folke/tokyonight.nvim", + -- lazy = true + -- }, { 'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' },