Config
This commit is contained in:
		
							parent
							
								
									7201dc4801
								
							
						
					
					
						commit
						be36a60446
					
				
							
								
								
									
										14
									
								
								init.lua
								
								
								
								
							
							
						
						
									
										14
									
								
								init.lua
								
								
								
								
							|  | @ -91,7 +91,7 @@ vim.g.mapleader = ' ' | |||
| vim.g.maplocalleader = ' ' | ||||
| 
 | ||||
| -- Set to true if you have a Nerd Font installed and selected in the terminal | ||||
| vim.g.have_nerd_font = false | ||||
| vim.g.have_nerd_font = true | ||||
| 
 | ||||
| -- [[ Setting options ]] | ||||
| -- See `:help vim.opt` | ||||
|  | @ -99,10 +99,10 @@ vim.g.have_nerd_font = false | |||
| --  For more options, you can see `:help option-list` | ||||
| 
 | ||||
| -- Make line numbers default | ||||
| vim.opt.number = true | ||||
| -- 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 | ||||
| 
 | ||||
| -- Enable mouse mode, can be useful for resizing splits for example! | ||||
| vim.opt.mouse = 'a' | ||||
|  | @ -779,9 +779,9 @@ require('lazy').setup({ | |||
| 
 | ||||
|           -- If you prefer more traditional completion keymaps, | ||||
|           -- you can uncomment the following lines | ||||
|           --['<CR>'] = cmp.mapping.confirm { select = true }, | ||||
|           --['<Tab>'] = cmp.mapping.select_next_item(), | ||||
|           --['<S-Tab>'] = cmp.mapping.select_prev_item(), | ||||
|           ['<CR>'] = cmp.mapping.confirm { select = true }, | ||||
|           ['<Tab>'] = cmp.mapping.select_next_item(), | ||||
|           ['<S-Tab>'] = cmp.mapping.select_prev_item(), | ||||
| 
 | ||||
|           -- Manually trigger a completion from nvim-cmp. | ||||
|           --  Generally you don't need this, because nvim-cmp will display | ||||
|  | @ -929,7 +929,7 @@ require('lazy').setup({ | |||
|   -- | ||||
|   --  Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. | ||||
|   --    For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` | ||||
|   -- { import = 'custom.plugins' }, | ||||
|   { import = 'custom.plugins' }, | ||||
| }, { | ||||
|   ui = { | ||||
|     -- If you are using a Nerd Font: set icons to an empty table which will use the | ||||
|  |  | |||
|  | @ -0,0 +1,67 @@ | |||
| return { | ||||
|   "lalitmee/browse.nvim", | ||||
|   depends = { "nvim-telescope/telescope.nvim" }, | ||||
|   lazy = false, | ||||
|   config = function() | ||||
|     local bookmarks = { | ||||
|       ["SE GitHub"] = { | ||||
|         ["Landing Page"] = "https://github.schneider-electric.com/", | ||||
|         ["Hpc-Firmware"] = "https://github.schneider-electric.com/MSol-NGM-HPC/hpc-firmware", | ||||
|         ["SEAPyPI"] = "https://github.schneider-electric.com/SEAPyPI", | ||||
|         ["Code Search"] = "https://github.schneider-electric.com/search?q=%s&type=code", | ||||
|         ["Repo Search"] = "https://github.schneider-electric.com/search?q=%s&type=repositories", | ||||
|         ["Issues Search"] = "https://github.schneider-electric.com/search?q=%s&type=issues", | ||||
|         ["Pulls Search"] = "https://github.schneider-electric.com/search?q=%s&type=pullrequests", | ||||
|       }, | ||||
|       ["GitHub"] = { | ||||
|         ["GitHub.com"] = "https://github.com/", | ||||
|         ["Code Search"] = "https://github.com/search?q=%s&type=code", | ||||
|         ["Repo Search"] = "https://github.com/search?q=%s&type=repositories", | ||||
|         ["Issues Search"] = "https://github.com/search?q=%s&type=issues", | ||||
|         ["Pulls Search"] = "https://github.com/search?q=%s&type=pullrequests", | ||||
|       }, | ||||
|       ["SE"] = { | ||||
|         ["Support"] = "https://schneider.service-now.com/supportatschneider?id=se_index", | ||||
|         ["Spice"] = "https://spice.se.com/", | ||||
|         ["Jira Board"] = "https://jira.se.com/secure/RapidBoard.jspa?rapidView=7703&quickFilter=61920#", | ||||
|         ["Jira Landing"] = "https://jira.se.com/", | ||||
|         ["TimeSheet"] = "https://se-ppm.sciforma.net/sciforma/?ACSREQUESTID=_f2b21659-6f25-470d-bab7-dbf9e5dbac64#2766", | ||||
|       }, | ||||
|       ["AvistoConnector"] = "https://vpn.elsys-eastern.com:1443/remote/login?lang=en", | ||||
|       ["Ziteboard"] = "https://app.ziteboard.com", | ||||
|     } | ||||
|     local browse = require "browse" | ||||
| 
 | ||||
|     function command(name, rhs, opts) | ||||
|       opts = opts or {} | ||||
|       vim.api.nvim_create_user_command(name, rhs, opts) | ||||
|     end | ||||
| 
 | ||||
|     command("InputSearch", function() browse.input_search() end, {}) | ||||
| 
 | ||||
|     -- this will open telescope using dropdown theme with all the available options | ||||
|     -- in which `browse.nvim` can be used | ||||
|     command("Browse", function() browse.browse { bookmarks = bookmarks } end) | ||||
| 
 | ||||
|     command("Bookmarks", function() browse.open_bookmarks { bookmarks = bookmarks } end) | ||||
| 
 | ||||
|     command("DevdocsSearch", function() browse.devdocs.search() end) | ||||
| 
 | ||||
|     command("DevdocsFiletypeSearch", function() browse.devdocs.search_with_filetype() end) | ||||
| 
 | ||||
|     command("MdnSearch", function() browse.mdn.search() end) | ||||
|     browse.setup { | ||||
|       -- search provider you want to use | ||||
|       provider = "duckduckgo", -- duckduckgo, bing | ||||
| 
 | ||||
|       -- either pass it here or just pass the table to the functions | ||||
|       -- see below for more | ||||
|       bookmarks = {}, | ||||
|       icons = { | ||||
|         bookmark_alias = "->", -- if you have nerd fonts, you can set this to "" | ||||
|         bookmarks_prompt = "", -- if you have nerd fonts, you can set this to " " | ||||
|         grouped_bookmarks = "->", -- if you have nerd fonts, you can set this to  | ||||
|       }, | ||||
|     } | ||||
|   end, | ||||
| } | ||||
|  | @ -0,0 +1,47 @@ | |||
| return { | ||||
|   "catppuccin/nvim", | ||||
|   name = "catppuccin", | ||||
|   transparent_background = true, | ||||
|   opts = { | ||||
|     flavour = "mocha", | ||||
|     dim_inactive = { enabled = true, percentage = 0.25 }, | ||||
|     integrations = { | ||||
|       alpha = true, | ||||
|       dashboard = false, | ||||
|       flash = false, | ||||
|       nvimtree = false, | ||||
|       ts_rainbow = false, | ||||
|       ts_rainbow2 = false, | ||||
|       barbecue = false, | ||||
|       indent_blankline = false, | ||||
|       navic = false, | ||||
|       dropbar = false, | ||||
| 
 | ||||
|       aerial = true, | ||||
|       dap = { enabled = true, enable_ui = true }, | ||||
|       headlines = true, | ||||
|       mason = true, | ||||
|       native_lsp = { enabled = true, inlay_hints = { background = false } }, | ||||
|       neogit = true, | ||||
|       neotree = true, | ||||
|       noice = true, | ||||
|       notify = true, | ||||
|       sandwich = true, | ||||
|       semantic_tokens = true, | ||||
|       symbols_outline = true, | ||||
|       telescope = { enabled = true, style = "nvchad" }, | ||||
|       which_key = true, | ||||
|     }, | ||||
|     custom_highlights = { | ||||
|       -- disable italics  for treesitter highlights | ||||
|       TabLineFill = { link = "StatusLine" }, | ||||
|       LspInlayHint = { style = { "italic" } }, | ||||
|       ["@parameter"] = { style = {} }, | ||||
|       ["@type.builtin"] = { style = {} }, | ||||
|       ["@namespace"] = { style = {} }, | ||||
|       ["@text.uri"] = { style = { "underline" } }, | ||||
|       ["@tag.attribute"] = { style = {} }, | ||||
|       ["@tag.attribute.tsx"] = { style = {} }, | ||||
|     }, | ||||
|   }, | ||||
| } | ||||
|  | @ -0,0 +1,24 @@ | |||
| local lspconfig = require 'lspconfig' | ||||
| local default_capabilities = require('cmp_nvim_lsp').default_capabilities() | ||||
| default_capabilities.offsetEncoding = { 'utf-16' } | ||||
| lspconfig.clangd.setup { | ||||
|   settings = { | ||||
|     clangd = { | ||||
|       usePlaceholders = true, | ||||
|       completeUnimported = true, | ||||
|       semanticHighlighting = true, | ||||
|     }, | ||||
|   }, | ||||
|   cmd = { | ||||
|     'clangd', | ||||
|     '--background-index', | ||||
|     '--clang-tidy', | ||||
|     '--header-insertion=iwyu', | ||||
|     '--completion-style=detailed', | ||||
|     '--function-arg-placeholders', | ||||
|     '--fallback-style=llvm', | ||||
|   }, | ||||
|   capabilities = default_capabilities, | ||||
| } | ||||
| 
 | ||||
| return {} | ||||
|  | @ -0,0 +1,30 @@ | |||
| return { | ||||
|   "p00f/clangd_extensions.nvim", | ||||
|   lazy = true, | ||||
|   config = function() end, | ||||
|   opts = { | ||||
|     inlay_hints = { | ||||
|       inline = false, | ||||
|     }, | ||||
|     ast = { | ||||
|       --These require codicons (https://github.com/microsoft/vscode-codicons) | ||||
|       role_icons = { | ||||
|         type = "", | ||||
|         declaration = "", | ||||
|         expression = "", | ||||
|         specifier = "", | ||||
|         statement = "", | ||||
|         ["template argument"] = "", | ||||
|       }, | ||||
|       kind_icons = { | ||||
|         Compound = "", | ||||
|         Recovery = "", | ||||
|         TranslationUnit = "", | ||||
|         PackExpansion = "", | ||||
|         TemplateTypeParm = "", | ||||
|         TemplateTemplateParm = "", | ||||
|         TemplateParamObject = "", | ||||
|       }, | ||||
|     }, | ||||
|   }, | ||||
| } | ||||
|  | @ -0,0 +1,9 @@ | |||
| return { | ||||
|   -- Add the community repository of plugin specifications | ||||
|   "AstroNvim/astrocommunity", | ||||
|   -- example of importing a plugin, comment out to use it or add your own | ||||
|   -- available plugins can be found at https://github.com/AstroNvim/astrocommunity | ||||
| 
 | ||||
|   -- { import = "astrocommunity.colorscheme.catppuccin" }, | ||||
|   -- { import = "astrocommunity.completion.copilot-lua-cmp" }, | ||||
| } | ||||
|  | @ -0,0 +1,14 @@ | |||
| return { | ||||
|   'CopilotC-Nvim/CopilotChat.nvim', | ||||
|   branch = 'canary', | ||||
|   dependencies = { | ||||
|     { 'zbirenbaum/copilot.lua' }, -- or github/copilot.vim | ||||
|     { 'nvim-lua/plenary.nvim' }, -- for curl, log wrapper | ||||
|   }, | ||||
|   config = function() | ||||
|     require('CopilotChat').setup { | ||||
|       debug = true, -- Enable debugging | ||||
|       -- See Configuration section for rest | ||||
|     } | ||||
|   end, | ||||
| } | ||||
|  | @ -0,0 +1,28 @@ | |||
| return { | ||||
|   "zbirenbaum/copilot.lua", | ||||
|   lazy = false, | ||||
|   opts = { | ||||
|     filetypes = { | ||||
|       ["*"] = true, | ||||
|     }, | ||||
|     panel = { | ||||
|       auto_refresh = false, | ||||
|       keymap = { | ||||
|         accept = "<CR>", | ||||
|         jump_prev = "[[", | ||||
|         jump_next = "]]", | ||||
|         refresh = "gr", | ||||
|         open = "<M-CR>", | ||||
|       }, | ||||
|     }, | ||||
|     suggestion = { | ||||
|       auto_trigger = true, | ||||
|       keymap = { | ||||
|         accept = "<M-l>", | ||||
|         prev = "<M-[>", | ||||
|         next = "<M-]>", | ||||
|         dismiss = "<C-]>", | ||||
|       }, | ||||
|     }, | ||||
|   }, | ||||
| } | ||||
|  | @ -0,0 +1,63 @@ | |||
| return { | ||||
|   -- customize alpha options | ||||
| { | ||||
|   "coffebar/transfer.nvim", | ||||
|   lazy = true, | ||||
|   cmd = { "TransferInit", "DiffRemote", "TransferUpload", "TransferDownload", "TransferDirDiff", "TransferRepeat" }, | ||||
|   opts = {}, | ||||
| }, | ||||
|   -- You can disable default plugins as follows: | ||||
|   -- { "max397574/better-escape.nvim", enabled = false }, | ||||
|   -- | ||||
|   -- You can also easily customize additional setup of plugins that is outside of the plugin's setup call | ||||
|   -- { | ||||
|   --   "L3MON4D3/LuaSnip", | ||||
|   --   config = function(plugin, opts) | ||||
|   --     require "plugins.configs.luasnip"(plugin, opts) -- include the default astronvim config that calls the setup call | ||||
|   --     -- add more custom luasnip configuration such as filetype extend or custom snippets | ||||
|   --     local luasnip = require "luasnip" | ||||
|   --     luasnip.filetype_extend("javascript", { "javascriptreact" }) | ||||
|   --   end, | ||||
|   -- }, | ||||
|   -- { | ||||
|   --   "windwp/nvim-autopairs", | ||||
|   --   config = function(plugin, opts) | ||||
|   --     require "plugins.configs.nvim-autopairs"(plugin, opts) -- include the default astronvim config that calls the setup call | ||||
|   --     -- add more custom autopairs configuration such as custom rules | ||||
|   --     local npairs = require "nvim-autopairs" | ||||
|   --     local Rule = require "nvim-autopairs.rule" | ||||
|   --     local cond = require "nvim-autopairs.conds" | ||||
|   --     npairs.add_rules( | ||||
|   --       { | ||||
|   --         Rule("$", "$", { "tex", "latex" }) | ||||
|   --           -- don't add a pair if the next character is % | ||||
|   --           :with_pair(cond.not_after_regex "%%") | ||||
|   --           -- don't add a pair if  the previous character is xxx | ||||
|   --           :with_pair( | ||||
|   --             cond.not_before_regex("xxx", 3) | ||||
|   --           ) | ||||
|   --           -- don't move right when repeat character | ||||
|   --           :with_move(cond.none()) | ||||
|   --           -- don't delete if the next character is xx | ||||
|   --           :with_del(cond.not_after_regex "xx") | ||||
|   --           -- disable adding a newline when you press <cr> | ||||
|   --           :with_cr(cond.none()), | ||||
|   --       }, | ||||
|   --       -- disable for .vim files, but it work for another filetypes | ||||
|   --       Rule("a", "a", "-vim") | ||||
|   --     ) | ||||
|   --   end, | ||||
|   -- }, | ||||
|   -- By adding to the which-key config and using our helper function you can add more which-key registered bindings | ||||
|   -- { | ||||
|   --   "folke/which-key.nvim", | ||||
|   --   config = function(plugin, opts) | ||||
|   --     require "plugins.configs.which-key"(plugin, opts) -- include the default astronvim config that calls the setup call | ||||
|   --     -- Add bindings which show up as group name | ||||
|   --     local wk = require "which-key" | ||||
|   --     wk.register({ | ||||
|   --       b = { name = "Buffer" }, | ||||
|   --     }, { mode = "n", prefix = "<leader>" }) | ||||
|   --   end, | ||||
|   -- }, | ||||
| } | ||||
|  | @ -0,0 +1,4 @@ | |||
| return { | ||||
|   "pbnj/vim-ddgr", | ||||
|   lazy = false, | ||||
| } | ||||
|  | @ -0,0 +1,5 @@ | |||
| return { | ||||
|   "neanias/everforest-nvim", | ||||
|   lazy = true, | ||||
|   transparent_background = true, | ||||
| } | ||||
|  | @ -0,0 +1,4 @@ | |||
| return { | ||||
|   "mkropat/vim-ezguifont", | ||||
|   lazy = false, | ||||
| } | ||||
|  | @ -0,0 +1,4 @@ | |||
| return { | ||||
|   "tpope/vim-fugitive", | ||||
|   lazy = false, | ||||
| } | ||||
|  | @ -0,0 +1,33 @@ | |||
| return { | ||||
|   'ellisonleao/gruvbox.nvim', | ||||
|   lazy = false, | ||||
| 
 | ||||
|   config = function() | ||||
|     require('gruvbox').setup { | ||||
|       terminal_colors = false, -- add neovim terminal colors | ||||
|       undercurl = true, | ||||
|       underline = true, | ||||
|       bold = true, | ||||
|       italic = { | ||||
|         strings = true, | ||||
|         emphasis = true, | ||||
|         comments = true, | ||||
|         operators = false, | ||||
|         folds = true, | ||||
|       }, | ||||
|       strikethrough = true, | ||||
|       invert_selection = false, | ||||
|       invert_signs = false, | ||||
|       invert_tabline = false, | ||||
|       invert_intend_guides = false, | ||||
|       inverse = true, -- invert background for search, diffs, statuslines and errors | ||||
|       contrast = 'hard', -- can be "hard", "soft" or empty string | ||||
|       palette_overrides = {}, | ||||
|       overrides = {}, | ||||
|       dim_inactive = false, | ||||
|       transparent_mode = true, | ||||
|     } | ||||
|     vim.o.background = 'dark' | ||||
|     vim.cmd [[colorscheme gruvbox]] | ||||
|   end, | ||||
| } | ||||
|  | @ -0,0 +1,6 @@ | |||
| return { | ||||
|     "m4xshen/hardtime.nvim", | ||||
|     lazy = false, | ||||
|     dependencies = {"MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim"}, | ||||
|     opts = {} | ||||
| } | ||||
|  | @ -0,0 +1,34 @@ | |||
| vim.keymap.set('n', '<leader>b;', ':let @+ = expand("%:p")<cr>', { desc = 'Copy Name' }) | ||||
| vim.keymap.set('n', '<leader>t;', ':tc %:p:h<cr>', { desc = 'Change Directory to file path' }) | ||||
| vim.keymap.set('n', '<leader>tr', ':tc <C-r>+<cr>', { desc = 'Change Directory to file path' }) | ||||
| 
 | ||||
| vim.keymap.set('n', '<leader>,', function() | ||||
|   local output = string.gsub(vim.fn.expand '%', '.md', '.pdf') | ||||
|   local command = ':!pandoc -t pdf --pdf-engine tectonic -o ' .. output .. ' --section-divs=true % ; okular ' .. output | ||||
|   vim.fn.execute(command) | ||||
| end) | ||||
| 
 | ||||
| vim.keymap.set('n', '<leader>be', ':tabe %<cr>', { desc = 'Open in New Tab' }) | ||||
| vim.keymap.set('n', '<leader>T', ':term<cr>', { desc = 'Terminal Here' }) | ||||
| vim.keymap.set('n', '<leader>-', ':tc -<cr>:pwd<cr>', { desc = 'Cd -' }) | ||||
| vim.keymap.set('n', '<leader>Q', ':bd! %<cr>', { desc = 'Quit buffer' }) | ||||
| vim.keymap.set('n', '<leader>L', ':!ls<cr>', { desc = 'List Items' }) | ||||
| vim.keymap.set('n', '<leader>D', ':!ri -Force %<cr>', { desc = 'Delete Item' }) | ||||
| 
 | ||||
| vim.keymap.set('n', 'gv', ':vs | lua vim.lsp.buf.definition()<cr>', { desc = 'Goto Definition split vertical' }) | ||||
| vim.keymap.set('n', 'gs', ':sp | lua vim.lsp.buf.definition()<cr>', { desc = 'Goto Definition split horizontal' }) | ||||
| 
 | ||||
| vim.keymap.set('n', '<C-->', ':DecreaseFont<CR>', { noremap = true, silent = true }) | ||||
| vim.keymap.set('n', '<C-=>', ':IncreaseFont<CR>', { noremap = true, silent = true }) | ||||
| vim.keymap.set('n', '<C-+>', ':IncreaseFont<CR>', { noremap = true, silent = true }) | ||||
| vim.keymap.set('n', '<C-0>', ':ResetFontSize<CR>', { noremap = true, silent = true }) | ||||
| 
 | ||||
| vim.keymap.set('n', '<C-s>', '<cmd>w!<cr>', { desc = 'Force write' }) | ||||
| vim.keymap.set('n', '<C-q>', '<cmd>qa!<cr>', { desc = 'Force quit' }) | ||||
| vim.keymap.set('n', '|', '<cmd>vsplit<cr>', { desc = 'Vertical Split' }) | ||||
| vim.keymap.set('n', '\\', '<cmd>split<cr>', { desc = 'Horizontal Split' }) | ||||
| vim.keymap.set('t', '<C-h>', '<cmd>wincmd h<cr>', { desc = 'Terminal left window navigation' }) | ||||
| vim.keymap.set('t', '<C-j>', '<cmd>wincmd j<cr>', { desc = 'Terminal down window navigation' }) | ||||
| vim.keymap.set('t', '<C-k>', '<cmd>wincmd k<cr>', { desc = 'Terminal up window navigation' }) | ||||
| vim.keymap.set('t', '<C-l>', '<cmd>wincmd l<cr>', { desc = 'Terminal right window navigation' }) | ||||
| return {} | ||||
|  | @ -0,0 +1,26 @@ | |||
| return { | ||||
|     "iamcco/markdown-preview.nvim", | ||||
|     ft = "markdown", | ||||
|     build = function() | ||||
|         vim.fn["mkdp#util#install"]() | ||||
|     end, | ||||
|     init = function() | ||||
|         local g = vim.g | ||||
|         g.mkdp_auto_start = 0 | ||||
|         g.mkdp_auto_close = 1 | ||||
|         g.mkdp_refresh_slow = 0 | ||||
|         g.mkdp_command_for_global = 0 | ||||
|         g.mkdp_open_to_the_world = 0 | ||||
|         g.mkdp_open_ip = '' | ||||
|         g.mkdp_browser = 'firefox' | ||||
|         g.mkdp_echo_preview_url = 0 | ||||
|         g.mkdp_browserfunc = '' | ||||
|         g.mkdp_theme = 'dark' | ||||
|         g.mkdp_filetypes = { "markdown" } | ||||
|         g.mkdp_page_title = "${name}.md" | ||||
|         g.mkdp_preview_options = { | ||||
|             disable_sync_scroll = 0, | ||||
|             disable_filename = 1 | ||||
|         } | ||||
|     end, | ||||
| } | ||||
|  | @ -0,0 +1,15 @@ | |||
| return { | ||||
|   "arminveres/md-pdf.nvim", | ||||
|   branch = "main", -- you can assume that main is somewhat stable until releases will be made | ||||
|   lazy = true, | ||||
|   keys = { | ||||
|     { | ||||
|       "<leader>,", | ||||
|       function() require("md-pdf").convert_md_to_pdf() end, | ||||
|       desc = "Markdown preview", | ||||
|     }, | ||||
|   }, | ||||
|   opts = { | ||||
|     toc = false, | ||||
|   }, | ||||
| } | ||||
|  | @ -0,0 +1,4 @@ | |||
| return{ | ||||
|   "savq/melange-nvim", | ||||
|   name = "melange" | ||||
| } | ||||
|  | @ -0,0 +1,4 @@ | |||
| return { | ||||
|   "jghauser/mkdir.nvim", | ||||
|   lazy = false, | ||||
| } | ||||
|  | @ -0,0 +1,17 @@ | |||
| return { | ||||
|   "karb94/neoscroll.nvim", | ||||
|   lazy = false, | ||||
|   config = function() | ||||
|     require("neoscroll").setup { | ||||
|       mappings = { "<C-u>", "<C-d>", "<C-b>", "<C-f>", "<C-y>", "<C-e>", "zt", "zz", "zb" }, | ||||
|       hide_cursor = true, -- Hide cursor while scrolling | ||||
|       stop_eof = true, -- Stop at <EOF> when scrolling downwards | ||||
|       respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file | ||||
|       cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further | ||||
|       easing_function = "quadratic", -- Default easing function | ||||
|       pre_hook = nil, -- Function to run before the scrolling animation starts | ||||
|       post_hook = nil, -- Function to run after the scrolling animation ends | ||||
|       performance_mode = false, -- Disable "Performance Mode" on all buffers. | ||||
|     } | ||||
|   end, | ||||
| } | ||||
|  | @ -0,0 +1,7 @@ | |||
| return { | ||||
|   "EdenEast/nightfox.nvim", | ||||
|   name = "nightfox", | ||||
|   style = "duskfox", | ||||
|   lazy = false, | ||||
|   transparent = true, | ||||
| } | ||||
|  | @ -0,0 +1,17 @@ | |||
| return { | ||||
|   "jose-elias-alvarez/null-ls.nvim", | ||||
|   opts = function(_, config) | ||||
|     -- config variable is the default configuration table for the setup function call | ||||
|     -- local null_ls = require "null-ls" | ||||
| 
 | ||||
|     -- Check supported formatters and linters | ||||
|     -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting | ||||
|     -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics | ||||
|     config.sources = { | ||||
|       -- Set a formatter | ||||
|       -- null_ls.builtins.formatting.stylua, | ||||
|       -- null_ls.builtins.formatting.prettier, | ||||
|     } | ||||
|     return config -- return final config table | ||||
|   end, | ||||
| } | ||||
|  | @ -0,0 +1,10 @@ | |||
| return { | ||||
|   "kylechui/nvim-surround", | ||||
|   version = "*", -- Use for stability; omit to use `main` branch for the latest features | ||||
|   event = "VeryLazy", | ||||
|   config = function() | ||||
|     require("nvim-surround").setup { | ||||
|       -- Configuration here, or leave empty to use defaults | ||||
|     } | ||||
|   end, | ||||
| } | ||||
|  | @ -0,0 +1,162 @@ | |||
| return { | ||||
|   "stevearc/oil.nvim", | ||||
|   lazy = false, | ||||
|   depends = { | ||||
|     "nvim-lua/nvim-web-devicons", | ||||
|   }, | ||||
|   config = function() | ||||
|     require("oil").setup { | ||||
|       -- Oil will take over directory buffers (e.g. `vim .` or `:e src/`) | ||||
|       -- Set to false if you still want to use netrw. | ||||
|       default_file_explorer = true, | ||||
|       -- Id is automatically added at the beginning, and name at the end | ||||
|       -- See :help oil-columns | ||||
|       columns = { | ||||
|         "icon", | ||||
|         -- "permissions", | ||||
|         -- "size", | ||||
|         -- "mtime", | ||||
|       }, | ||||
|       -- Buffer-local options to use for oil buffers | ||||
|       buf_options = { | ||||
|         buflisted = false, | ||||
|         bufhidden = "hide", | ||||
|       }, | ||||
|       -- Window-local options to use for oil buffers | ||||
|       win_options = { | ||||
|         wrap = false, | ||||
|         signcolumn = "no", | ||||
|         cursorcolumn = false, | ||||
|         foldcolumn = "0", | ||||
|         spell = false, | ||||
|         list = false, | ||||
|         conceallevel = 3, | ||||
|         concealcursor = "nvic", | ||||
|       }, | ||||
|       -- Send deleted files to the trash instead of permanently deleting them (:help oil-trash) | ||||
|       delete_to_trash = false, | ||||
|       -- Skip the confirmation popup for simple operations (:help oil.skip_confirm_for_simple_edits) | ||||
|       skip_confirm_for_simple_edits = false, | ||||
|       -- Selecting a new/moved/renamed file or directory will prompt you to save changes first | ||||
|       -- (:help prompt_save_on_select_new_entry) | ||||
|       prompt_save_on_select_new_entry = true, | ||||
|       -- Oil will automatically delete hidden buffers after this delay | ||||
|       -- You can set the delay to false to disable cleanup entirely | ||||
|       -- Note that the cleanup process only starts when none of the oil buffers are currently displayed | ||||
|       cleanup_delay_ms = 2000, | ||||
|       lsp_file_methods = { | ||||
|         -- Time to wait for LSP file operations to complete before skipping | ||||
|         timeout_ms = 1000, | ||||
|         -- Set to true to autosave buffers that are updated with LSP willRenameFiles | ||||
|         -- Set to "unmodified" to only save unmodified buffers | ||||
|         autosave_changes = false, | ||||
|       }, | ||||
|       -- Constrain the cursor to the editable parts of the oil buffer | ||||
|       -- Set to `false` to disable, or "name" to keep it on the file names | ||||
|       constrain_cursor = "editable", | ||||
|       -- Set to true to watch the filesystem for changes and reload oil | ||||
|       experimental_watch_for_changes = false, | ||||
|       -- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap | ||||
|       -- options with a `callback` (e.g. { callback = function() ... end, desc = "", mode = "n" }) | ||||
|       -- Additionally, if it is a string that matches "actions.<name>", | ||||
|       -- it will use the mapping at require("oil.actions").<name> | ||||
|       -- Set to `false` to remove a keymap | ||||
|       -- See :help oil-actions for a list of all available actions | ||||
|       keymaps = { | ||||
|         ["g?"] = "actions.show_help", | ||||
|         ["<CR>"] = "actions.select", | ||||
|         ["<C-s>"] = "actions.select_vsplit", | ||||
|         ["<C-h>"] = "actions.select_split", | ||||
|         ["<C-t>"] = "actions.select_tab", | ||||
|         ["<C-p>"] = "actions.preview", | ||||
|         ["<C-c>"] = "actions.close", | ||||
|         ["<C-l>"] = "actions.refresh", | ||||
|         ["-"] = "actions.parent", | ||||
|         ["_"] = "actions.open_cwd", | ||||
|         ["`"] = "actions.cd", | ||||
|         ["~"] = "actions.tcd", | ||||
|         ["gs"] = "actions.change_sort", | ||||
|         ["gx"] = "actions.open_external", | ||||
|         ["g."] = "actions.toggle_hidden", | ||||
|         ["g\\"] = "actions.toggle_trash", | ||||
|       }, | ||||
|       -- Configuration for the floating keymaps help window | ||||
|       keymaps_help = { | ||||
|         border = "rounded", | ||||
|       }, | ||||
|       -- Set to false to disable all of the above keymaps | ||||
|       use_default_keymaps = true, | ||||
|       view_options = { | ||||
|         -- Show files and directories that start with "." | ||||
|         show_hidden = false, | ||||
|         -- This function defines what is considered a "hidden" file | ||||
|         is_hidden_file = function(name, bufnr) return vim.startswith(name, ".") end, | ||||
|         -- This function defines what will never be shown, even when `show_hidden` is set | ||||
|         is_always_hidden = function(name, bufnr) return false end, | ||||
|         sort = { | ||||
|           -- sort order can be "asc" or "desc" | ||||
|           -- see :help oil-columns to see which columns are sortable | ||||
|           { "type", "asc" }, | ||||
|           { "name", "asc" }, | ||||
|         }, | ||||
|       }, | ||||
|       -- Configuration for the floating window in oil.open_float | ||||
|       float = { | ||||
|         -- Padding around the floating window | ||||
|         padding = 2, | ||||
|         max_width = 0, | ||||
|         max_height = 0, | ||||
|         border = "rounded", | ||||
|         win_options = { | ||||
|           winblend = 0, | ||||
|         }, | ||||
|         -- This is the config that will be passed to nvim_open_win. | ||||
|         -- Change values here to customize the layout | ||||
|         override = function(conf) return conf end, | ||||
|       }, | ||||
|       -- Configuration for the actions floating preview window | ||||
|       preview = { | ||||
|         -- Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) | ||||
|         -- min_width and max_width can be a single value or a list of mixed integer/float types. | ||||
|         -- max_width = {100, 0.8} means "the lesser of 100 columns or 80% of total" | ||||
|         max_width = 0.9, | ||||
|         -- min_width = {40, 0.4} means "the greater of 40 columns or 40% of total" | ||||
|         min_width = { 40, 0.4 }, | ||||
|         -- optionally define an integer/float for the exact width of the preview window | ||||
|         width = nil, | ||||
|         -- Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) | ||||
|         -- min_height and max_height can be a single value or a list of mixed integer/float types. | ||||
|         -- max_height = {80, 0.9} means "the lesser of 80 columns or 90% of total" | ||||
|         max_height = 0.9, | ||||
|         -- min_height = {5, 0.1} means "the greater of 5 columns or 10% of total" | ||||
|         min_height = { 5, 0.1 }, | ||||
|         -- optionally define an integer/float for the exact height of the preview window | ||||
|         height = nil, | ||||
|         border = "rounded", | ||||
|         win_options = { | ||||
|           winblend = 0, | ||||
|         }, | ||||
|         -- Whether the preview window is automatically updated when the cursor is moved | ||||
|         update_on_cursor_moved = true, | ||||
|       }, | ||||
|       -- Configuration for the floating progress window | ||||
|       progress = { | ||||
|         max_width = 0.9, | ||||
|         min_width = { 40, 0.4 }, | ||||
|         width = nil, | ||||
|         max_height = { 10, 0.9 }, | ||||
|         min_height = { 5, 0.1 }, | ||||
|         height = nil, | ||||
|         border = "rounded", | ||||
|         minimized_border = "none", | ||||
|         win_options = { | ||||
|           winblend = 0, | ||||
|         }, | ||||
|       }, | ||||
|       -- Configuration for the floating SSH window | ||||
|       ssh = { | ||||
|         border = "rounded", | ||||
|       }, | ||||
|     } | ||||
|   end, | ||||
| } | ||||
|  | @ -0,0 +1,9 @@ | |||
| return { | ||||
|   "cbochs/portal.nvim", | ||||
|   -- Optional dependencies | ||||
|   event = "BufRead", | ||||
|   dependencies = { | ||||
|     "cbochs/grapple.nvim", | ||||
|     "ThePrimeagen/harpoon", | ||||
|   }, | ||||
| } | ||||
|  | @ -0,0 +1,11 @@ | |||
| local lspconfig = require 'lspconfig' | ||||
| local bundle_path = '~/Lsp/PowerShellEditorServices' | ||||
| local default_capabilities = require('cmp_nvim_lsp').default_capabilities() | ||||
| lspconfig.powershell_es.setup { | ||||
|   capabilities = default_capabilities, | ||||
|   bundle_path = bundle_path, | ||||
|   filetypes = { 'ps1' }, | ||||
|   init_options = { enableProfileLoading = false }, | ||||
| } | ||||
| 
 | ||||
| return {} | ||||
|  | @ -0,0 +1,35 @@ | |||
| local lspconfig = require 'lspconfig' | ||||
| local lsp_capabilities = vim.lsp.protocol.make_client_capabilities() | ||||
| lspconfig.pylsp.setup { | ||||
|   settings = { | ||||
|     pylsp = { | ||||
|       plugins = { | ||||
|         -- formatter options | ||||
|         black = { enabled = false }, | ||||
|         autopep8 = { enabled = true }, | ||||
|         yapf = { enabled = false }, | ||||
|         -- linter options | ||||
|         pylint = { enabled = false, executable = 'pylint' }, | ||||
|         pyflakes = { enabled = false }, | ||||
|         pycodestyle = { enabled = true, maxLineLength = 200 }, | ||||
|         -- type checker | ||||
|         pylsp_mypy = { enabled = true, live_mode = true, strict = true }, | ||||
|         -- auto-completion options | ||||
|         jedi_completion = { fuzzy = true }, | ||||
|         -- import sorting | ||||
|         pyls_isort = { enabled = true }, | ||||
|         rope_autoimport = { | ||||
|           enabled = false, | ||||
|           completions = { enabled = true }, | ||||
|           code_actions = { enabled = true }, | ||||
|         }, | ||||
|       }, | ||||
|     }, | ||||
|   }, | ||||
|   flags = { | ||||
|     debounce_text_changes = 200, | ||||
|   }, | ||||
|   capabilities = lsp_capabilities, | ||||
| } | ||||
| 
 | ||||
| return {} | ||||
|  | @ -0,0 +1,18 @@ | |||
| vim.opt.shell = 'pwsh' | ||||
| vim.opt.shellcmdflag = | ||||
|   "-NoProfile -NoLogo -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues['Out-File:Encoding']='utf8';$PSStyle.OutputRendering = [System.Management.Automation.OutputRendering]::PlainText;" | ||||
| vim.opt.shellredir = '2>&1 | %%{ "$_" } | Out-File %s; exit $LastExitCode' | ||||
| vim.opt.shellpipe = '2>&1 | %%{ "$_" } | Tee-Object %s; exit $LastExitCode' | ||||
| vim.opt.shellquote = '' | ||||
| vim.opt.shellxquote = '' | ||||
| 
 | ||||
| vim.api.nvim_create_user_command('Pterm', 'term pwsh', {}) | ||||
| vim.api.nvim_create_user_command('PT', 'term pwsh', {}) | ||||
| vim.api.nvim_create_user_command('Uterm', 'term wsl.exe', {}) | ||||
| vim.api.nvim_create_user_command('UT', 'term wsl.exe', {}) | ||||
| vim.api.nvim_create_user_command('BDAll', '%bd! | e#', {}) | ||||
| vim.api.nvim_create_user_command('NT', 'bd! % | term', {}) | ||||
| vim.api.nvim_create_user_command('NUT', 'bd! % | Uterm', {}) | ||||
| vim.api.nvim_create_user_command('CC', 'CopilotChat', {}) | ||||
| 
 | ||||
| return {} | ||||
|  | @ -0,0 +1,4 @@ | |||
| return { | ||||
|   'tpope/vim-sleuth', | ||||
|   -- config = function() require("vim-sleuth").setup {} end, | ||||
| } | ||||
|  | @ -0,0 +1,4 @@ | |||
| return { | ||||
|   "sainnhe/sonokai", | ||||
|   lazy = false, | ||||
| } | ||||
|  | @ -0,0 +1 @@ | |||
| return { "folke/tokyonight.nvim", lazy = false, priority = 1000, opts = {}, transparent = true } | ||||
|  | @ -0,0 +1,37 @@ | |||
| return { | ||||
|   "xiyaowong/transparent.nvim", | ||||
|   lazy = false, | ||||
|   config = function() | ||||
|     require("transparent").setup { -- Optional, you don't have to run setup. | ||||
|       groups = { -- table: default groups | ||||
|         "Normal", | ||||
|         "NormalNC", | ||||
|         "Comment", | ||||
|         "Constant", | ||||
|         "Special", | ||||
|         "Identifier", | ||||
|         "Statement", | ||||
|         "PreProc", | ||||
|         "Type", | ||||
|         "Underlined", | ||||
|         "Todo", | ||||
|         "String", | ||||
|         "Function", | ||||
|         "Conditional", | ||||
|         "Repeat", | ||||
|         "Operator", | ||||
|         "Structure", | ||||
|         "LineNr", | ||||
|         "NonText", | ||||
|         "SignColumn", | ||||
|         "CursorLine", | ||||
|         "CursorLineNr", | ||||
|         "StatusLine", | ||||
|         "StatusLineNC", | ||||
|         "EndOfBuffer", | ||||
|       }, | ||||
|       extra_groups = {}, -- table: additional groups that should be cleared | ||||
|       exclude_groups = {}, -- table: groups you don't want to clear | ||||
|     } | ||||
|   end, | ||||
| } | ||||
|  | @ -0,0 +1,17 @@ | |||
| local lspconfig = require 'lspconfig' | ||||
| local lsp_capabilities = vim.lsp.protocol.make_client_capabilities() | ||||
| lspconfig.typos_lsp.setup { | ||||
|   -- Logging level of the language server. Logs appear in :LspLog. Defaults to error. | ||||
|   -- cmd_env = { RUST_LOG = "error" }, | ||||
|   capabilities = lsp_capabilities, | ||||
|   init_options = { | ||||
|     -- Custom config. Used together with any workspace config files, taking precedence for | ||||
|     -- settings declared in both. Equivalent to the typos `--config` cli argument. | ||||
|     -- config = "~/code/typos-lsp/crates/typos-lsp/tests/typos.toml", | ||||
|     -- How typos are rendered in the editor, eg: as errors, warnings, information, or hints. | ||||
|     -- Defaults to error. | ||||
|     diagnosticSeverity = 'Error', | ||||
|   }, | ||||
| } | ||||
| 
 | ||||
| return {} | ||||
|  | @ -0,0 +1,20 @@ | |||
| return { | ||||
|   -- You can also add new plugins here as well: | ||||
|   -- Add plugins, the lazy syntax | ||||
|   -- "andweeb/presence.nvim", | ||||
|   -- { | ||||
|   --   "ray-x/lsp_signature.nvim", | ||||
|   --   event = "BufRead", | ||||
|   --   config = function() | ||||
|   --     require("lsp_signature").setup() | ||||
|   --   end, | ||||
|  { | ||||
|     'chipsenkbeil/distant.nvim',  | ||||
|     branch = 'v0.3', | ||||
|     config = function() | ||||
|         require('distant'):setup() | ||||
|     end | ||||
| }, | ||||
| 
 | ||||
|    -- }, | ||||
| } | ||||
|  | @ -0,0 +1,3 @@ | |||
| return { | ||||
|   "nvim-tree/nvim-web-devicons" | ||||
| } | ||||
		Loading…
	
		Reference in New Issue