add many plugins
This commit is contained in:
parent
e4260c415e
commit
7b821a02d3
|
@ -0,0 +1,5 @@
|
|||
return {
|
||||
enable = false,
|
||||
'windwp/nvim-autopairs',
|
||||
-- Optional dependency
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
return {
|
||||
'Exafunction/codeium.nvim',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
opts = {},
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
return { -- Autoformat
|
||||
enable = false,
|
||||
'stevearc/conform.nvim',
|
||||
opts = {
|
||||
notify_on_error = false,
|
||||
|
@ -15,7 +16,7 @@ return { -- Autoformat
|
|||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
-- Conform can also run multiple formatters sequentially
|
||||
python = { "isort", "black" },
|
||||
python = { 'black' },
|
||||
--
|
||||
-- You can use a sub-list to tell conform to run *until* a formatter
|
||||
-- is found.
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
return {
|
||||
'folke/flash.nvim',
|
||||
event = 'VeryLazy',
|
||||
vscode = true,
|
||||
---@type Flash.Config
|
||||
opts = {},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "S", mode = { "n", "o", "x" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||
},
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
return {
|
||||
'ThePrimeagen/harpoon',
|
||||
branch = 'harpoon2',
|
||||
opts = {
|
||||
menu = {
|
||||
width = vim.api.nvim_win_get_width(0) - 4,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
'<leader>H',
|
||||
function()
|
||||
require('harpoon'):list():append()
|
||||
end,
|
||||
desc = 'Harpoon File',
|
||||
},
|
||||
{
|
||||
'<leader>h',
|
||||
function()
|
||||
local harpoon = require 'harpoon'
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end,
|
||||
desc = 'Harpoon Quick Menu',
|
||||
},
|
||||
{
|
||||
'<leader>1',
|
||||
function()
|
||||
require('harpoon'):list():select(1)
|
||||
end,
|
||||
desc = 'Harpoon to File 1',
|
||||
},
|
||||
{
|
||||
'<leader>2',
|
||||
function()
|
||||
require('harpoon'):list():select(2)
|
||||
end,
|
||||
desc = 'Harpoon to File 2',
|
||||
},
|
||||
{
|
||||
'<leader>3',
|
||||
function()
|
||||
require('harpoon'):list():select(3)
|
||||
end,
|
||||
desc = 'Harpoon to File 3',
|
||||
},
|
||||
{
|
||||
'<leader>4',
|
||||
function()
|
||||
require('harpoon'):list():select(4)
|
||||
end,
|
||||
desc = 'Harpoon to File 4',
|
||||
},
|
||||
{
|
||||
'<leader>5',
|
||||
function()
|
||||
require('harpoon'):list():select(5)
|
||||
end,
|
||||
desc = 'Harpoon to File 5',
|
||||
},
|
||||
},
|
||||
}
|
|
@ -7,6 +7,7 @@ return {
|
|||
local lint = require 'lint'
|
||||
lint.linters_by_ft = {
|
||||
markdown = { 'markdownlint' },
|
||||
python = { 'ruff' },
|
||||
}
|
||||
|
||||
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
||||
|
|
|
@ -73,6 +73,9 @@ return { -- LSP Configuration & Plugins
|
|||
-- the definition of its *type*, not where it was *defined*.
|
||||
map('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
|
||||
|
||||
-- Show signature help
|
||||
-- vim.keymap.set('i', '<C-s>', require 'telescope.builtin', { buffer = event.buf, desc = 'LSP: signature help' })
|
||||
|
||||
-- Fuzzy find all the symbols in your current document.
|
||||
-- Symbols are things like variables, functions, types, etc.
|
||||
map('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
|
||||
|
@ -136,7 +139,19 @@ return { -- LSP Configuration & Plugins
|
|||
local servers = {
|
||||
-- clangd = {},
|
||||
-- gopls = {},
|
||||
pyright = {},
|
||||
pyright = {
|
||||
settings = {
|
||||
python = {
|
||||
analysis = {
|
||||
useLibraryCodeForTypes = true,
|
||||
diagnosticSeverityOverrides = {
|
||||
reportUnusedVariable = 'warning', -- or anything
|
||||
},
|
||||
typeCheckingMode = 'off',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- rust_analyzer = {},
|
||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||
--
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
opts = {
|
||||
options = { theme = 'gruvbox_dark' },
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||
lualine_c = {
|
||||
'filename',
|
||||
function()
|
||||
return vim.fn['nvim_treesitter#statusline'](180)
|
||||
end,
|
||||
},
|
||||
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
||||
lualine_y = { 'progress' },
|
||||
lualine_z = { 'location' },
|
||||
},
|
||||
},
|
||||
}
|
|
@ -16,20 +16,21 @@ return { -- Collection of various small independent plugins/modules
|
|||
-- - sr)' - [S]urround [R]eplace [)] [']
|
||||
require('mini.surround').setup()
|
||||
|
||||
require('mini.pairs').setup()
|
||||
-- Simple and easy statusline.
|
||||
-- You could remove this setup call if you don't like it,
|
||||
-- and try some other statusline plugin
|
||||
local statusline = require 'mini.statusline'
|
||||
--local statusline = require 'mini.statusline'
|
||||
-- set use_icons to true if you have a Nerd Font
|
||||
statusline.setup { use_icons = vim.g.have_nerd_font }
|
||||
-- statusline.setup { use_icons = vim.g.have_nerd_font }
|
||||
|
||||
-- You can configure sections in the statusline by overriding their
|
||||
-- default behavior. For example, here we set the section for
|
||||
-- cursor location to LINE:COLUMN
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
statusline.section_location = function()
|
||||
return '%2l:%-2v'
|
||||
end
|
||||
--statusline.section_location = function()
|
||||
-- return '%2l:%-2v'
|
||||
--end
|
||||
|
||||
-- ... and there is more!
|
||||
-- Check out: https://github.com/echasnovski/mini.nvim
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
return {
|
||||
'nvimtools/none-ls.nvim',
|
||||
config = function()
|
||||
local null_ls = require 'null-ls'
|
||||
|
||||
null_ls.setup {
|
||||
sources = {
|
||||
null_ls.builtins.formatting.black,
|
||||
null_ls.builtins.diagnostics.mypy,
|
||||
null_ls.builtins.formatting.ruff,
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
|
@ -33,6 +33,12 @@ return { -- Autocompletion
|
|||
-- into multiple repos for maintenance purposes.
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-path',
|
||||
{
|
||||
'Exafunction/codeium.nvim',
|
||||
cmd = 'Codeium',
|
||||
build = ':Codeium Auth',
|
||||
opts = {},
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
-- See `:help cmp`
|
||||
|
@ -65,7 +71,8 @@ return { -- Autocompletion
|
|||
-- Accept ([y]es) the completion.
|
||||
-- This will auto-import if your LSP supports it.
|
||||
-- This will expand snippets if the LSP sent a snippet.
|
||||
['<C-y>'] = cmp.mapping.confirm { select = true },
|
||||
|
||||
['<CR>'] = cmp.mapping.confirm { select = true }, -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
|
||||
-- Manually trigger a completion from nvim-cmp.
|
||||
-- Generally you don't need this, because nvim-cmp will display
|
||||
|
@ -98,6 +105,7 @@ return { -- Autocompletion
|
|||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'path' },
|
||||
{ name = 'codeium' },
|
||||
},
|
||||
}
|
||||
end,
|
||||
|
|
Loading…
Reference in New Issue