heheheha
This commit is contained in:
@ -5,7 +5,7 @@ vim.g.maplocalleader = "\\"
|
||||
vim.opt.shortmess:append("c")
|
||||
|
||||
-- Sets the height of the command line area at the bottom
|
||||
vim.opt.cmdheight = 2
|
||||
vim.opt.cmdheight = 1
|
||||
|
||||
-- Displays the line number for the current line
|
||||
vim.opt.number = true
|
||||
|
||||
@ -10,10 +10,11 @@ require("flash").setup({
|
||||
}
|
||||
})
|
||||
|
||||
vim.keymap.set({ "n", "x", "o" }, "s", function() require("flash").jump() end)
|
||||
vim.keymap.set({ "n", "x", "o" }, "S", function() require("flash").treesitter() end)
|
||||
vim.keymap.set({ "o" }, "r", function() require("flash").remote() end)
|
||||
vim.keymap.set({ "o", "x" }, "R", function() require("flash").treesitter_search() end)
|
||||
vim.keymap.set({ "c" }, "<c-s>", function() require("flash").toggle() end)
|
||||
Flash = require("flash")
|
||||
vim.keymap.set({ "n", "x", "o" }, "s", function() Flash.jump() end)
|
||||
vim.keymap.set({ "n", "x", "o" }, "S", function() Flash.treesitter() end)
|
||||
vim.keymap.set({ "o" }, "r", function() Flash.remote() end)
|
||||
vim.keymap.set({ "o", "x" }, "R", function() Flash.treesitter_search() end)
|
||||
vim.keymap.set({ "c" }, "<c-s>", function() Flash.toggle() end)
|
||||
|
||||
|
||||
|
||||
51
lua/plugins/git.lua
Normal file
51
lua/plugins/git.lua
Normal file
@ -0,0 +1,51 @@
|
||||
vim.pack.add({ "https://github.com/lewis6991/gitsigns.nvim" })
|
||||
|
||||
require('gitsigns').setup {
|
||||
signs = {
|
||||
add = { text = '┃' },
|
||||
change = { text = '┃' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
untracked = { text = '┆' },
|
||||
},
|
||||
signs_staged = {
|
||||
add = { text = '┃' },
|
||||
change = { text = '┃' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
untracked = { text = '┆' },
|
||||
},
|
||||
signs_staged_enable = true,
|
||||
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
|
||||
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
|
||||
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
||||
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
||||
watch_gitdir = {
|
||||
follow_files = true
|
||||
},
|
||||
auto_attach = true,
|
||||
attach_to_untracked = false,
|
||||
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 1000,
|
||||
ignore_whitespace = false,
|
||||
virt_text_priority = 100,
|
||||
use_focus = true,
|
||||
},
|
||||
current_line_blame_formatter = '<author>, <author_time:%R> - <summary>',
|
||||
sign_priority = 6,
|
||||
update_debounce = 100,
|
||||
status_formatter = nil, -- Use default
|
||||
max_file_length = 40000, -- Disable if file is longer than this (in lines)
|
||||
preview_config = {
|
||||
-- Options passed to nvim_open_win
|
||||
style = 'minimal',
|
||||
relative = 'cursor',
|
||||
row = 0,
|
||||
col = 1
|
||||
},
|
||||
}
|
||||
@ -8,3 +8,4 @@ require("plugins.multicursor")
|
||||
require("plugins.lsplines")
|
||||
require("plugins.mini")
|
||||
require("plugins.flash")
|
||||
require("plugins.git")
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
vim.pack.add({ 'https://github.com/neovim/nvim-lspconfig' })
|
||||
|
||||
vim.lsp.enable({ 'lua_ls' })
|
||||
vim.lsp.enable({ 'clangd' })
|
||||
|
||||
@ -7,25 +8,17 @@ vim.lsp.config("rust_analyzer", {
|
||||
["rust-analyzer"] = {
|
||||
completion =
|
||||
{
|
||||
postfix = { enable = false, },
|
||||
postfix = { enable = true, },
|
||||
},
|
||||
}
|
||||
},
|
||||
})
|
||||
vim.lsp.enable('rust_analyzer', {
|
||||
settings = {
|
||||
['rust-analyzer'] = {
|
||||
completion = {
|
||||
postfix = {
|
||||
enable = true, -- Postfix snippets
|
||||
['rust-analyzer'] = {
|
||||
check = {
|
||||
command = "clippy",
|
||||
},
|
||||
},
|
||||
check = {
|
||||
command = "clippy",
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
vim.lsp.enable('rust_analyzer')
|
||||
|
||||
vim.keymap.set("n", "<leader>t", vim.diagnostic.open_float)
|
||||
vim.keymap.set("n", "<leader>sr", vim.lsp.buf.rename)
|
||||
|
||||
@ -1,6 +1,27 @@
|
||||
vim.pack.add({"https://github.com/nvim-mini/mini.surround"})
|
||||
require('mini.surround').setup()
|
||||
vim.pack.add({ "https://github.com/nvim-mini/mini.surround" })
|
||||
require('mini.surround').setup({
|
||||
mappings = {
|
||||
add = 'ma', -- Add surrounding in Normal and Visual modes
|
||||
delete = 'md', -- Delete surrounding
|
||||
find = 'mf', -- Find surrounding (to the right)
|
||||
find_left = 'mF', -- Find surrounding (to the left)
|
||||
highlight = 'mh', -- Highlight surrounding
|
||||
replace = 'mr', -- Replace surrounding
|
||||
|
||||
suffix_last = 'l', -- Suffix to search with "prev" method
|
||||
suffix_next = 'n', -- Suffix to search with "next" method
|
||||
},
|
||||
|
||||
-- To remove default spaces that are added by default
|
||||
custom_surroundings = {
|
||||
['('] = { input = { '%b()', '^.().*().$' }, output = { left = '(', right = ')' } },
|
||||
['['] = { input = { '%b[]', '^.().*().$' }, output = { left = '[', right = ']' } },
|
||||
['{'] = { input = { '%b{}', '^.().*().$' }, output = { left = '{', right = '}' } },
|
||||
['<'] = { input = { '%b<>', '^.().*().$' }, output = { left = '<', right = '>' } },
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
-- Comments
|
||||
vim.pack.add({"https://github.com/nvim-mini/mini.comment"})
|
||||
vim.pack.add({ "https://github.com/nvim-mini/mini.comment" })
|
||||
require('mini.comment').setup()
|
||||
|
||||
@ -16,6 +16,10 @@
|
||||
"rev": "fcea7ff883235d9024dc41e638f164a450c14ca2",
|
||||
"src": "https://github.com/folke/flash.nvim"
|
||||
},
|
||||
"gitsigns.nvim": {
|
||||
"rev": "8d82c240f190fc33723d48c308ccc1ed8baad69d",
|
||||
"src": "https://github.com/lewis6991/gitsigns.nvim"
|
||||
},
|
||||
"lsp_lines.nvim": {
|
||||
"rev": "a92c755f182b89ea91bd8a6a2227208026f27b4d",
|
||||
"src": "https://git.sr.ht/~whynothugo/lsp_lines.nvim"
|
||||
|
||||
Reference in New Issue
Block a user