From 04b401ea5b9afc4a1f33d28fee379306183658e7 Mon Sep 17 00:00:00 2001 From: Piotr Anisko Date: Wed, 13 Nov 2024 10:01:21 +0100 Subject: [PATCH 1/6] added own setup --- init.lua | 60 +++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 16 deletions(-) diff --git a/init.lua b/init.lua index 4ce35f4b..2ac4bddc 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,6 @@ --[[ + ===================================================================== ==================== READ THIS BEFORE CONTINUING ==================== ===================================================================== @@ -176,10 +177,10 @@ vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagn vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) -- TIP: Disable arrow keys in normal mode --- vim.keymap.set('n', '', 'echo "Use h to move!!"') --- vim.keymap.set('n', '', 'echo "Use l to move!!"') --- vim.keymap.set('n', '', 'echo "Use k to move!!"') --- vim.keymap.set('n', '', 'echo "Use j to move!!"') +vim.keymap.set('n', '', 'echo "Use h to move!!"') +vim.keymap.set('n', '', 'echo "Use l to move!!"') +vim.keymap.set('n', '', 'echo "Use k to move!!"') +vim.keymap.set('n', '', 'echo "Use j to move!!"') -- Keybinds to make split navigation easier. -- Use CTRL+ to switch between windows @@ -255,7 +256,33 @@ require('lazy').setup({ }, }, }, - + -- MY CONFIG + { 'mbbill/undotree' }, + { + 'christoomey/vim-tmux-navigator', + cmd = { + 'TmuxNavigateLeft', + 'TmuxNavigateDown', + 'TmuxNavigateUp', + 'TmuxNavigateRight', + 'TmuxNavigatePrevious', + }, + keys = { + { '', 'TmuxNavigateLeft' }, + { '', 'TmuxNavigateDown' }, + { '', 'TmuxNavigateUp' }, + { '', 'TmuxNavigateRight' }, + { '', 'TmuxNavigatePrevious' }, + }, + }, + { + 'cuducos/yaml.nvim', + ft = { 'yaml' }, -- optional + dependencies = { + 'nvim-treesitter/nvim-treesitter', + 'nvim-telescope/telescope.nvim', -- optional + }, + }, -- NOTE: Plugins can also be configured to run Lua code when they are loaded. -- -- This is often very useful to both group configuration, as well as handle @@ -271,6 +298,7 @@ require('lazy').setup({ -- after the plugin has been loaded: -- config = function() ... end + -- PLUGIN CONFIG { -- Useful plugin to show you pending keybinds. 'folke/which-key.nvim', event = 'VimEnter', -- Sets the loading event to 'VimEnter' @@ -331,7 +359,7 @@ require('lazy').setup({ -- you do for a plugin at the top level, you can do for a dependency. -- -- Use the `dependencies` key to specify the dependencies of a particular plugin - + { vim.keymap.set('n', '', vim.cmd.UndotreeToggle, { desc = 'Undo tree toggle' }) }, { -- Fuzzy Finder (files, lsp, etc) 'nvim-telescope/telescope.nvim', event = 'VimEnter', @@ -589,13 +617,13 @@ require('lazy').setup({ }) -- Change diagnostic symbols in the sign column (gutter) - -- if vim.g.have_nerd_font then - -- local signs = { Error = '', Warn = '', Hint = '', Info = '' } - -- for type, icon in pairs(signs) do - -- local hl = 'DiagnosticSign' .. type - -- vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) - -- end - -- end + if vim.g.have_nerd_font then + local signs = { Error = '', Warn = '', Hint = '', Info = '' } + for type, icon in pairs(signs) do + local hl = 'DiagnosticSign' .. type + vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) + end + end -- LSP servers and clients are able to communicate to each other what features they support. -- By default, Neovim doesn't support everything that is in the LSP specification. @@ -784,11 +812,11 @@ require('lazy').setup({ -- Accept ([y]es) the completion. -- This will auto-import if your LSP supports it. -- This will expand snippets if the LSP sent a snippet. - [''] = cmp.mapping.confirm { select = true }, + --[''] = cmp.mapping.confirm { select = true }, -- If you prefer more traditional completion keymaps, -- you can uncomment the following lines - --[''] = cmp.mapping.confirm { select = true }, + [''] = cmp.mapping.confirm { select = true }, --[''] = cmp.mapping.select_next_item(), --[''] = cmp.mapping.select_prev_item(), @@ -897,7 +925,7 @@ require('lazy').setup({ main = 'nvim-treesitter.configs', -- Sets main module to use for opts -- [[ Configure Treesitter ]] See `:help nvim-treesitter` opts = { - ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, + ensure_installed = { 'python', 'sql', 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc', 'java' }, -- Autoinstall languages that are not installed auto_install = true, highlight = { From 43ca3f53bffcc28573dce2bee171339dea7f7f24 Mon Sep 17 00:00:00 2001 From: Piotr Anisko Date: Thu, 14 Nov 2024 08:50:31 +0100 Subject: [PATCH 2/6] uncommented black --- init.lua | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 2ac4bddc..2cd1019b 100644 --- a/init.lua +++ b/init.lua @@ -487,6 +487,8 @@ require('lazy').setup({ { 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants 'williamboman/mason-lspconfig.nvim', 'WhoIsSethDaniel/mason-tool-installer.nvim', + -- ADDED TO SUPPORT TOML + 'cespare/vim-toml', -- Useful status updates for LSP. -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` @@ -737,7 +739,7 @@ require('lazy').setup({ formatters_by_ft = { lua = { 'stylua' }, -- Conform can also run multiple formatters sequentially - -- python = { "isort", "black" }, + python = { 'isort', 'black' }, -- -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, @@ -925,7 +927,23 @@ require('lazy').setup({ main = 'nvim-treesitter.configs', -- Sets main module to use for opts -- [[ Configure Treesitter ]] See `:help nvim-treesitter` opts = { - ensure_installed = { 'python', 'sql', 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc', 'java' }, + ensure_installed = { + 'toml', + 'python', + 'sql', + 'bash', + 'c', + 'diff', + 'html', + 'lua', + 'luadoc', + 'markdown', + 'markdown_inline', + 'query', + 'vim', + 'vimdoc', + 'java', + }, -- Autoinstall languages that are not installed auto_install = true, highlight = { From a886a0a2af62dcd578cd0d6107c91f9432bbffb6 Mon Sep 17 00:00:00 2001 From: Piotr Anisko Date: Mon, 18 Nov 2024 15:19:24 +0100 Subject: [PATCH 3/6] additional extensions --- init.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 2cd1019b..ec365301 100644 --- a/init.lua +++ b/init.lua @@ -103,7 +103,9 @@ vim.g.have_nerd_font = false vim.opt.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.opt.relativenumber = true +vim.opt.relativenumber = true +--- MYEDIT +vim.opt.signcolumn = 'number' -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' @@ -479,6 +481,7 @@ require('lazy').setup({ }, }, { 'Bilal2453/luvit-meta', lazy = true }, + { 'cespare/vim-toml' }, { -- Main LSP Configuration 'neovim/nvim-lspconfig', @@ -488,7 +491,6 @@ require('lazy').setup({ 'williamboman/mason-lspconfig.nvim', 'WhoIsSethDaniel/mason-tool-installer.nvim', -- ADDED TO SUPPORT TOML - 'cespare/vim-toml', -- Useful status updates for LSP. -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` @@ -928,6 +930,9 @@ require('lazy').setup({ -- [[ Configure Treesitter ]] See `:help nvim-treesitter` opts = { ensure_installed = { + 'regex', + 'diff', + 'yaml', 'toml', 'python', 'sql', From 4fd416a86a84c31b930bfd1b2c59c5ca11386354 Mon Sep 17 00:00:00 2001 From: Piotr Anisko Date: Sat, 30 Nov 2024 21:22:26 +0100 Subject: [PATCH 4/6] added tabnine cmp --- init.lua | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 98 insertions(+), 7 deletions(-) diff --git a/init.lua b/init.lua index ec365301..dd25f6a3 100644 --- a/init.lua +++ b/init.lua @@ -230,6 +230,7 @@ vim.opt.rtp:prepend(lazypath) -- :Lazy update -- -- NOTE: Here is where you install your plugins. + require('lazy').setup({ -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically @@ -259,6 +260,72 @@ require('lazy').setup({ }, }, -- MY CONFIG + -- { + -- 'iamcco/markdown-preview.nvim', + -- cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' }, + -- ft = { 'markdown' }, + -- build = function() + -- vim.fn['mkdp#util#install']() + -- end, + -- }, + { + 'nvim-lualine/lualine.nvim', + dependencies = { 'nvim-tree/nvim-web-devicons', 'archibate/lualine-time' }, + config = function() + require('lualine').setup { + options = { + icons_enabled = true, + theme = 'auto', + component_separators = { left = '', right = '' }, + section_separators = { left = '', right = '' }, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + always_show_tabline = true, + globalstatus = false, + refresh = { + statusline = 100, + tabline = 100, + winbar = 100, + }, + }, + sections = { + lualine_a = { 'mode' }, + lualine_b = { 'branch', 'diff', 'diagnostics' }, + lualine_c = { 'filename' }, + lualine_d = { 'lsp_progress' }, + lualine_w = { 'tabnine' }, + lualine_x = { 'ctime' }, + lualine_y = { 'encoding', 'fileformat', 'filetype' }, + lualine_z = { 'location' }, + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { 'filename' }, + lualine_x = { 'location' }, + lualine_y = {}, + lualine_z = {}, + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {}, + } + end, + }, + { + 'numToStr/Comment.nvim', + opts = { + -- add any options here + }, + config = function() + require('Comment').setup() + end, + }, { 'mbbill/undotree' }, { 'christoomey/vim-tmux-navigator', @@ -361,7 +428,9 @@ require('lazy').setup({ -- you do for a plugin at the top level, you can do for a dependency. -- -- Use the `dependencies` key to specify the dependencies of a particular plugin - { vim.keymap.set('n', '', vim.cmd.UndotreeToggle, { desc = 'Undo tree toggle' }) }, + -- changed keymap + --{ vim.keymap.set('n', '', vim.cmd.UndotreeToggle, { desc = 'Undo tree toggle' }) }, + { vim.keymap.set('n', 'u', vim.cmd.UndotreeToggle, { desc = 'Undo tree toggle' }) }, { -- Fuzzy Finder (files, lsp, etc) 'nvim-telescope/telescope.nvim', event = 'VimEnter', @@ -487,7 +556,8 @@ require('lazy').setup({ 'neovim/nvim-lspconfig', dependencies = { -- Automatically install LSPs and related tools to stdpath for Neovim - { 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants + { 'williamboman/mason.nvim', opts = { ensure_installed = { 'ansible-lint' } }, config = true }, + -- NOTE: Must be loaded before dependants 'williamboman/mason-lspconfig.nvim', 'WhoIsSethDaniel/mason-tool-installer.nvim', -- ADDED TO SUPPORT TOML @@ -648,7 +718,8 @@ require('lazy').setup({ local servers = { -- clangd = {}, -- gopls = {}, - -- pyright = {}, + pyright = {}, + ansiblels = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- @@ -748,7 +819,24 @@ require('lazy').setup({ }, }, }, - + --TABNINE + { + 'codota/tabnine-nvim', + build = './dl_binaries.sh', + config = function() + require('tabnine').setup { + disable_auto_comment = true, + accept_keymap = '', + dismiss_keymap = '', + debounce_ms = 800, + suggestion_color = { gui = '#808080', cterm = 244 }, + exclude_filetypes = { 'TelescopePrompt', 'NvimTree' }, + log_file_path = nil, -- absolute path to Tabnine log file + ignore_certificate_errors = false, + } + require('tabnine.status').status() + end, + }, { -- Autocompletion 'hrsh7th/nvim-cmp', event = 'InsertEnter', @@ -876,7 +964,8 @@ require('lazy').setup({ -- Load the colorscheme here. -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'tokyonight-night' + --vim.cmd.colorscheme 'tokyonight-night' + vim.cmd.colorscheme 'tokyonight-storm' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' @@ -982,8 +1071,7 @@ require('lazy').setup({ -- require 'kickstart.plugins.lint', -- require 'kickstart.plugins.autopairs', -- require 'kickstart.plugins.neo-tree', - -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps - + require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. -- @@ -1016,5 +1104,8 @@ require('lazy').setup({ }, }) +-- transparencyv +vim.api.nvim_set_hl(0, 'Normal', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'NormalFloat', { bg = 'none' }) -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et From 8aa9f985ce2de1dceae2eeebecaaeef487df6383 Mon Sep 17 00:00:00 2001 From: Piotr Anisko Date: Wed, 12 Mar 2025 16:07:34 +0100 Subject: [PATCH 5/6] Added nvim-tree --- init.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/init.lua b/init.lua index dd25f6a3..ea4f4839 100644 --- a/init.lua +++ b/init.lua @@ -268,6 +268,26 @@ require('lazy').setup({ -- vim.fn['mkdp#util#install']() -- end, -- }, + -- disable netrw at the very start of your init.lua + { + 'nvim-tree/nvim-tree.lua', + config = function() + require('nvim-tree').setup { + sort = { + sorter = 'case_sensitive', + }, + view = { + width = 30, + }, + renderer = { + group_empty = true, + }, + filters = { + dotfiles = true, + }, + } + end, + }, { 'nvim-lualine/lualine.nvim', dependencies = { 'nvim-tree/nvim-web-devicons', 'archibate/lualine-time' }, @@ -368,6 +388,7 @@ require('lazy').setup({ -- config = function() ... end -- PLUGIN CONFIG + { -- Useful plugin to show you pending keybinds. 'folke/which-key.nvim', event = 'VimEnter', -- Sets the loading event to 'VimEnter' @@ -1107,5 +1128,10 @@ require('lazy').setup({ -- transparencyv vim.api.nvim_set_hl(0, 'Normal', { bg = 'none' }) vim.api.nvim_set_hl(0, 'NormalFloat', { bg = 'none' }) +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 + +-- optionally enable 24-bit colour +vim.opt.termguicolors = true -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et From e889d341a0287aa6b6e57ce7e3f30524ca1f47a5 Mon Sep 17 00:00:00 2001 From: Piotr Anisko Date: Mon, 27 Oct 2025 20:52:07 +0100 Subject: [PATCH 6/6] updated status bar --- init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 4278a9c4..ce731566 100644 --- a/init.lua +++ b/init.lua @@ -313,7 +313,7 @@ require('lazy').setup({ }, ignore_focus = {}, always_divide_middle = true, - always_show_tabline = true, + -- always_show_tabline = true, globalstatus = false, refresh = { statusline = 100, @@ -326,8 +326,8 @@ require('lazy').setup({ lualine_b = { 'branch', 'diff', 'diagnostics' }, lualine_c = { 'filename' }, lualine_d = { 'lsp_progress' }, - lualine_w = { 'tabnine' }, - lualine_x = { 'ctime' }, + -- lualine_w = { 'tabnine' }, + -- lualine_x = { 'ctime' }, lualine_y = { 'encoding', 'fileformat', 'filetype' }, lualine_z = { 'location' }, },