add more plugins, change some keybinds

This commit is contained in:
2024-06-16 18:55:56 +03:00
parent 1a2bb7dce6
commit b71f7c2cce
9 changed files with 118 additions and 7 deletions

View File

@@ -0,0 +1 @@
vim.opt.colorcolumn = "95"

View File

@@ -6,10 +6,12 @@
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"dressing.nvim": { "branch": "master", "commit": "e3714c8049b2243e792492c4149e4cc395c68eb9" },
"fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
"git-blame.nvim": { "branch": "master", "commit": "408d5487d908dfe5d48e5645d8b27ddcc16b11e0" },
"gruvbox.nvim": { "branch": "main", "commit": "d4cde3853a172485961b515c36d51d757728d6e6" },
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
"icon-picker.nvim": { "branch": "master", "commit": "3ee9a0ea9feeef08ae35e40c8be6a2fa2c20f2d3" },
"indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" },
"lazy.nvim": { "branch": "main", "commit": "70f2c090d3ffb14f8702d468e05beb240b768881" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
@@ -23,10 +25,12 @@
"nvim-surround": { "branch": "main", "commit": "f1f0699a1d49f28e607ffa4361f1bbe757ac5ebc" },
"nvim-treesitter": { "branch": "master", "commit": "3a74b5831058d0daf8952a5b8c556c61b30a3f46" },
"nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" },
"oil.nvim": { "branch": "master", "commit": "b77ed915ab1e53720a6283702816cea2695a2638" },
"plenary": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"search.nvim": { "branch": "main", "commit": "7b8f2315d031be73e14bc2d82386dfac15952614" },
"telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
"trouble.nvim": { "branch": "main", "commit": "60b0ac3772e991bc194207afc28368a5f15d913a" },
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
"vim-be-good": { "branch": "master", "commit": "4fa57b7957715c91326fcead58c1fa898b9b3625" },
"vim-fugitive": { "branch": "master", "commit": "4f59455d2388e113bd510e85b310d15b9228ca0d" },

View File

@@ -0,0 +1,4 @@
return {
'stevearc/dressing.nvim',
opts = {},
}

View File

@@ -0,0 +1,12 @@
return {
"ziontee113/icon-picker.nvim",
config = function()
require("icon-picker").setup({ disable_legacy_commands = true })
local opts = { noremap = true, silent = true }
vim.keymap.set("n", "<Leader><Leader>i", "<cmd>IconPickerNormal<cr>", opts)
vim.keymap.set("n", "<Leader><Leader>y", "<cmd>IconPickerYank<cr>", opts) --> Yank the selected icon into register
vim.keymap.set("i", "<C-i>", "<cmd>IconPickerInsert<cr>", opts)
end
}

View File

@@ -3,22 +3,26 @@ return {
dependencies = {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
"hrsh7th/nvim-cmp",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"SergioRibera/cmp-dotenv",
"hrsh7th/cmp-cmdline",
"hrsh7th/nvim-cmp",
"L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip",
"L3MON4D3/LuaSnip",
"j-hui/fidget.nvim",
},
config = function()
local cmp = require('cmp')
local luasnip = require("luasnip")
local augroup = vim.api.nvim_create_augroup
local LspGroup = augroup('Lsp', {})
local autocmd = vim.api.nvim_create_autocmd
require("fidget").setup({})
local cmp = require('cmp')
local luasnip = require('luasnip')
require('fidget').setup({})
require('mason').setup({})
require('mason-lspconfig').setup({
-- Replace the language servers listed here
@@ -88,5 +92,19 @@ return {
},
})
local pythonLineLength = 95
require('lspconfig').pylsp.setup {
settings = {
pylsp = {
plugins = {
pycodestyle = {
maxLineLength = pythonLineLength
}
}
}
}
}
end
}

View File

@@ -0,0 +1,9 @@
return {
'stevearc/oil.nvim',
-- Optional dependencies
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {},
config = function ()
require("oil").setup()
end
}

View File

@@ -8,7 +8,25 @@ return {
version = "0.1.6",
config = function()
require('telescope').setup({})
local telescope = require('telescope')
local telescopeConfig = require('telescope.config')
local vimgrep_arguments = { unpack(telescopeConfig.values.vimgrep_arguments) }
table.insert(vimgrep_arguments, "--hidden")
table.insert(vimgrep_arguments, "--glob")
table.insert(vimgrep_arguments, "!**/.git/*")
telescope.setup({
defaults = {
vimgrep_arguments = vimgrep_arguments,
},
pickers = {
find_files = {
find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" },
}
}
})
local search = require('search')
local builtin = require('telescope.builtin')
@@ -17,6 +35,11 @@ return {
next = '<Tab>',
prev = '<S-Tab>'
},
tabs = {
{ name = 'Files', tele_func = builtin.find_files, tele_opts = { no_ignore = true, hidden = true } },
{ name = 'Grep', tele_func = builtin.live_grep },
{ name = 'Buffers', tele_func = builtin.buffers },
},
append_tabs = { -- append_tabs will add the provided tabs to the default ones
{
'Commits', -- or name = "Commits"
@@ -29,6 +52,9 @@ return {
})
vim.keymap.set('n', '<leader>pf', search.open, {})
vim.keymap.set('n', '<leader>pb', function()
search.open({ tab_name = 'Buffers' })
end)
vim.keymap.set('n', '<leader>pws', function()
local word = vim.fn.expand("<cword>")
builtin.grep_string({ search = word })

View File

@@ -0,0 +1,37 @@
return {
"folke/trouble.nvim",
opts = {}, -- for default options, refer to the configuration section for custom setup.
cmd = "Trouble",
keys = {
{
"<leader>tt",
"<cmd>Trouble diagnostics toggle<cr>",
desc = "Diagnostics (Trouble)",
},
{
"<leader>tT",
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
desc = "Buffer Diagnostics (Trouble)",
},
{
"<leader>ts",
"<cmd>Trouble symbols toggle focus=false<cr>",
desc = "Symbols (Trouble)",
},
{
"<leader>tl",
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
desc = "LSP Definitions / references / ... (Trouble)",
},
{
"<leader>tL",
"<cmd>Trouble loclist toggle<cr>",
desc = "Location List (Trouble)",
},
{
"<leader>tQ",
"<cmd>Trouble qflist toggle<cr>",
desc = "Quickfix List (Trouble)",
},
},
}

View File

@@ -1,5 +1,5 @@
vim.g.mapleader = " "
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
vim.keymap.set("n", "<leader>pv", ":Oil .<CR>")
-- move selected blocks
vim.keymap.set("v", "<S-J>", ":m '>+1<CR>gv=gv")