Merge pull request #6 from nbur4556/editing-improvements
Editing improvements
This commit is contained in:
commit
98b6135f00
|
|
@ -8,18 +8,21 @@
|
||||||
"fidget.nvim": { "branch": "main", "commit": "7b9c383438a2e490e37d57b07ddeae3ab4f4cf69" },
|
"fidget.nvim": { "branch": "main", "commit": "7b9c383438a2e490e37d57b07ddeae3ab4f4cf69" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
|
"friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" },
|
"gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" },
|
||||||
|
"harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "7206c77cb931f79885fc47f88ae18f99148392eb" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "7206c77cb931f79885fc47f88ae18f99148392eb" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
|
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
|
||||||
|
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "9453e3d6cd2ca45d96e20f343e8f1b927364b630" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "9453e3d6cd2ca45d96e20f343e8f1b927364b630" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" },
|
"mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" },
|
||||||
"neodev.nvim": { "branch": "main", "commit": "ef351fae5df2559956398923c5d38c9b64e7d898" },
|
"neodev.nvim": { "branch": "main", "commit": "ef351fae5df2559956398923c5d38c9b64e7d898" },
|
||||||
|
"nvim-autopairs": { "branch": "master", "commit": "096d0baecc34f6c5d8a6dd25851e9d5ad338209b" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
|
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "84f2dd42efffa20d505ac44c78568d778ca7e0a1" },
|
"nvim-lspconfig": { "branch": "master", "commit": "84f2dd42efffa20d505ac44c78568d778ca7e0a1" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "ab818bf5a2ee21515ade9afcf428e98056b6197b" },
|
"nvim-treesitter": { "branch": "master", "commit": "ab818bf5a2ee21515ade9afcf428e98056b6197b" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" },
|
||||||
"oil.nvim": { "branch": "master", "commit": "24027ed8d7f3ee5c38cfd713915e2e16d89e79b3" },
|
"oil.nvim": { "branch": "master", "commit": "24027ed8d7f3ee5c38cfd713915e2e16d89e79b3" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
|
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" },
|
||||||
"rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" },
|
"rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" },
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
||||||
"telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
|
"telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
|
||||||
|
|
@ -27,5 +30,6 @@
|
||||||
"vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" },
|
"vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" },
|
||||||
"vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" },
|
"vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" },
|
||||||
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
|
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
|
||||||
|
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
|
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
|
||||||
}
|
}
|
||||||
|
|
@ -12,10 +12,18 @@ return {
|
||||||
|
|
||||||
-- Adds a number of user-friendly snippets
|
-- Adds a number of user-friendly snippets
|
||||||
'rafamadriz/friendly-snippets',
|
'rafamadriz/friendly-snippets',
|
||||||
|
|
||||||
|
-- Auto-closing brackets, quotes, etc.
|
||||||
|
'windwp/nvim-autopairs',
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
|
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||||
local cmp = require 'cmp'
|
local cmp = require 'cmp'
|
||||||
local luasnip = require 'luasnip'
|
local luasnip = require 'luasnip'
|
||||||
|
|
||||||
|
require('nvim-autopairs').setup();
|
||||||
|
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
||||||
|
|
||||||
require('luasnip.loaders.from_vscode').lazy_load()
|
require('luasnip.loaders.from_vscode').lazy_load()
|
||||||
luasnip.config.setup {}
|
luasnip.config.setup {}
|
||||||
|
|
||||||
|
|
@ -29,8 +37,8 @@ return {
|
||||||
completeopt = 'menu,menuone,noinsert',
|
completeopt = 'menu,menuone,noinsert',
|
||||||
},
|
},
|
||||||
mapping = cmp.mapping.preset.insert {
|
mapping = cmp.mapping.preset.insert {
|
||||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
['<C-j>'] = cmp.mapping.select_next_item(),
|
||||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
['<C-k>'] = cmp.mapping.select_prev_item(),
|
||||||
['<C-u>'] = cmp.mapping.scroll_docs(-4),
|
['<C-u>'] = cmp.mapping.scroll_docs(-4),
|
||||||
['<C-d>'] = cmp.mapping.scroll_docs(4),
|
['<C-d>'] = cmp.mapping.scroll_docs(4),
|
||||||
['<C-Space>'] = cmp.mapping.complete {},
|
['<C-Space>'] = cmp.mapping.complete {},
|
||||||
|
|
@ -44,6 +52,9 @@ return {
|
||||||
{ name = 'luasnip' },
|
{ name = 'luasnip' },
|
||||||
{ name = 'path' },
|
{ name = 'path' },
|
||||||
},
|
},
|
||||||
|
experimental = {
|
||||||
|
ghost_text = true,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
return { 'catppuccin/nvim', name='catppuccin', priority = 1000,
|
-- Default theme
|
||||||
|
return {
|
||||||
|
'catppuccin/nvim',
|
||||||
|
name = 'catppuccin',
|
||||||
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
require('catppuccin').setup({
|
require('catppuccin').setup({
|
||||||
flavour = "macchiato",
|
flavour = "macchiato",
|
||||||
|
|
@ -8,6 +12,11 @@ return { 'catppuccin/nvim', name='catppuccin', priority = 1000,
|
||||||
conditionals = { 'italic' },
|
conditionals = { 'italic' },
|
||||||
},
|
},
|
||||||
integrations = {
|
integrations = {
|
||||||
|
cmp = true,
|
||||||
|
gitsigns = true,
|
||||||
|
harpoon = true,
|
||||||
|
mason = true,
|
||||||
|
telescope = true,
|
||||||
treesitter = true,
|
treesitter = true,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
-- UI for git commands
|
||||||
return { 'tpope/vim-fugitive',
|
return { 'tpope/vim-fugitive',
|
||||||
config = function()
|
config = function()
|
||||||
vim.keymap.set('n', '<leader>gs', '<CMD>Git<CR>', { desc = '[G]it [S]tatus' });
|
vim.keymap.set('n', '<leader>gs', '<CMD>Git<CR>', { desc = '[G]it [S]tatus' });
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
-- Displays git changes in gutter
|
||||||
return {
|
return {
|
||||||
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||||
'lewis6991/gitsigns.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
-- tag and quickly switch between buffers
|
||||||
|
return {
|
||||||
|
'thePrimeagen/harpoon',
|
||||||
|
config = function()
|
||||||
|
local harpoon_mark = require('harpoon.mark')
|
||||||
|
local harpoon_ui = require("harpoon.ui")
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>ho', function()
|
||||||
|
harpoon_ui.toggle_quick_menu()
|
||||||
|
end, { desc = '[O]pen [H]arpoon' })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>ha', function()
|
||||||
|
harpoon_mark.add_file()
|
||||||
|
end, { desc = '[A]dd [H]arpoon file' })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>hr', function()
|
||||||
|
harpoon_mark.rm_file()
|
||||||
|
end, { desc = '[R]emove [H]arpoon file' })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>hc', function()
|
||||||
|
harpoon_mark.clear_all()
|
||||||
|
end, { desc = '[C]lear [H]arpoon files' })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>hl', function()
|
||||||
|
harpoon_ui.nav_next()
|
||||||
|
end, { desc = 'Next [H]arpoon file' })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>hh', function()
|
||||||
|
harpoon_ui.nav_prev()
|
||||||
|
end, { desc = 'Previous [H]arpoon file' })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>1', function()
|
||||||
|
harpoon_ui.nav_file(1)
|
||||||
|
end, { desc = 'Navigate to file [1]' })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>2', function()
|
||||||
|
harpoon_ui.nav_file(2)
|
||||||
|
end, { desc = 'Navigate to file [2]' })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>3', function()
|
||||||
|
harpoon_ui.nav_file(3)
|
||||||
|
end, { desc = 'Navigate to file [3]' })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>4', function()
|
||||||
|
harpoon_ui.nav_file(4)
|
||||||
|
end, { desc = 'Navigate to file [4]' })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>5', function()
|
||||||
|
harpoon_ui.nav_file(5)
|
||||||
|
end, { desc = 'Navigate to file [5]' })
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
-- Configuration for language servers
|
||||||
local function keymaps(bufnr)
|
local function keymaps(bufnr)
|
||||||
local keymap = function(keys, func, desc)
|
local keymap = function(keys, func, desc)
|
||||||
if desc then
|
if desc then
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,16 @@
|
||||||
|
-- Informational status line at bottom of screen
|
||||||
return {
|
return {
|
||||||
-- Set lualine as statusline
|
|
||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
opts = {
|
opts = {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = false,
|
theme = 'catppuccin',
|
||||||
theme = 'onedark',
|
|
||||||
component_separators = '|',
|
component_separators = '|',
|
||||||
section_separators = '',
|
section_separators = '',
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_c = {
|
||||||
|
{ "filename", path = 1 }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
return {
|
||||||
|
'iamcco/markdown-preview.nvim',
|
||||||
|
ft = 'markdown',
|
||||||
|
build = function()
|
||||||
|
vim.fn['mkdp#util#install']()
|
||||||
|
end,
|
||||||
|
cmd = {
|
||||||
|
'MarkdownPreviewToggle',
|
||||||
|
'MarkdownPreview',
|
||||||
|
'MarkdownStop',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
return { 'stevearc/oil.nvim',
|
-- file browser
|
||||||
|
return {
|
||||||
|
'stevearc/oil.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
require("oil").setup();
|
require('oil').setup()
|
||||||
vim.keymap.set('n', '<leader>-', '<CMD>Oil --float<CR>', { desc = 'Open current directory' })
|
vim.keymap.set('n', '<leader>-', '<CMD>Oil --float<CR>', { desc = 'Open current directory' })
|
||||||
end
|
end
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
-- rust language integrations
|
||||||
return {
|
return {
|
||||||
'rust-lang/rust.vim',
|
'rust-lang/rust.vim',
|
||||||
ft = "rust",
|
ft = "rust",
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
-- Fuzzy finder
|
||||||
local function telescope_live_grep_open_files()
|
local function telescope_live_grep_open_files()
|
||||||
require('telescope.builtin').live_grep {
|
require('telescope.builtin').live_grep {
|
||||||
grep_open_files = true,
|
grep_open_files = true,
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
-- Comment highlighting for specific comment types (TODO, NOTE, HACK, FIX)
|
||||||
return {
|
return {
|
||||||
'folke/todo-comments.nvim',
|
'folke/todo-comments.nvim',
|
||||||
dependencies = { 'nvim-lua//plenary.nvim' },
|
dependencies = { 'nvim-lua//plenary.nvim' },
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
-- code token highlighting
|
||||||
local text_objects = {
|
local text_objects = {
|
||||||
select = {
|
select = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
'tpope/vim-surround'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
-- displays command and key chain options and help
|
||||||
return { 'folke/which-key.nvim', opts = {},
|
return { 'folke/which-key.nvim', opts = {},
|
||||||
config = function()
|
config = function()
|
||||||
-- document existing key chains
|
-- document existing key chains
|
||||||
|
|
@ -6,6 +7,7 @@ return { 'folke/which-key.nvim', opts = {},
|
||||||
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
|
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
|
||||||
['<leader>g'] = { name = '[G]it', _ = 'which_key_ignore' },
|
['<leader>g'] = { name = '[G]it', _ = 'which_key_ignore' },
|
||||||
['<leader>gh'] = { name = '[G]it [H]unk', _ = 'which_key_ignore' },
|
['<leader>gh'] = { name = '[G]it [H]unk', _ = 'which_key_ignore' },
|
||||||
|
['<leader>h'] = { name = '[H]arpoon'},
|
||||||
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
|
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
|
||||||
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
|
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
|
||||||
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,11 @@ vim.opt.incsearch = true
|
||||||
-- Enable mouse mode
|
-- Enable mouse mode
|
||||||
vim.opt.mouse = ''
|
vim.opt.mouse = ''
|
||||||
|
|
||||||
-- FIX: shared clipboard not working
|
|
||||||
-- Sync clipboard between OS and Neovim.
|
-- Sync clipboard between OS and Neovim.
|
||||||
vim.opt.clipboard = 'unnamedplus'
|
vim.opt.clipboard = 'unnamed,unnamedplus'
|
||||||
|
|
||||||
|
-- Enables cursor-line highlighting
|
||||||
|
vim.opt.cursorline = true
|
||||||
|
|
||||||
-- Enable spell check
|
-- Enable spell check
|
||||||
vim.opt.spell = true
|
vim.opt.spell = true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue