Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
PandaTinker committed May 22, 2024
1 parent 5925605 commit 756998e
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 17 deletions.
11 changes: 8 additions & 3 deletions link_src/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "de1a287c9cb525ae52bc846e8f6207e5ef1da5ac" },
"auto-session": { "branch": "main", "commit": "af2219b9fa99c1d7ac409bd9eac094c459d3f52d" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
"flash.nvim": { "branch": "main", "commit": "11a2e667d19d8f48c93c6ed2e2e525ac6b1b79be" },
"gitsigns.nvim": { "branch": "main", "commit": "805610a9393fa231f2c2b49cb521bfa413fadb3d" },
"indent-blankline.nvim": { "branch": "master", "commit": "ece00d5fb44d196680a81fd2761062d2fa44663b" },
"lazy.nvim": { "branch": "main", "commit": "0de782a6b0ffba599dbd332a4019d852564bf28c" },
"lazy.nvim": { "branch": "main", "commit": "9895337d1f4c0cea1186d92148e3d80f6551eda8" },
"lsp-format-modifications.nvim": { "branch": "main", "commit": "470ec6ab2a1eb201f2ca39de8be3d0ed23067853" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "67210c0e775adec55de9826b038e8b62de554afc" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "c1fbdcb0d8d1295314f1612c4a247253e70299d9" },
Expand All @@ -21,12 +24,14 @@
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
"nvim-dap": { "branch": "master", "commit": "5a2f7121869394502521c52b2bc581ab22c69447" },
"nvim-dap-go": { "branch": "main", "commit": "5faf165f5062187320eaf9d177c3c1f647adc22e" },
"nvim-dap-ui": { "branch": "master", "commit": "71bfe9bd6b3465e169b53bea4f83775034d822dd" },
"nvim-dap-ui": { "branch": "master", "commit": "334cf3038c4756e6ab999cbac67c847fb654c190" },
"nvim-lint": { "branch": "master", "commit": "1f98d6c863f91706369d74aeb2eb3f02b2e96861" },
"nvim-lspconfig": { "branch": "master", "commit": "9bda20fb967075355f253911bc066a8b5a03c77e" },
"nvim-nio": { "branch": "master", "commit": "8765cbc4d0c629c8158a5341e1b4305fd93c3a90" },
"nvim-reload": { "branch": "master", "commit": "7c1ab3f4c6ab3c6875aec5a946c7ce068fba75f7" },
"nvim-treesitter": { "branch": "master", "commit": "7c9c5bed8340031f8a6dad47a58a26eaf15b9a56" },
"plenary.nvim": { "branch": "master", "commit": "b5c8de02a44ffeabff678090edd6a132ff8ab77d" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5f9bf4b1ead7707e4e74e5319ee56bdc81fb73db" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"ripgrep.nvim": { "branch": "main", "commit": "1263dfdef75c09d04648d2735951733ee7e4f82c" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
Expand Down
6 changes: 6 additions & 0 deletions link_src/nvim/lua/custom/plugins/auto-session.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
return {
'rmagatti/auto-session',
opts = {
auto_session_use_git_branch = true,
}
}
7 changes: 7 additions & 0 deletions link_src/nvim/lua/custom/plugins/flash.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
return {
"folke/flash.nvim",
event = "VeryLazy",
---@type Flash.Config
opts = {},
-- te
}
8 changes: 8 additions & 0 deletions link_src/nvim/lua/custom/plugins/git.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
return {
{
'lewis6991/gitsigns.nvim',
opts = {
current_line_blame = false,
}
}
}
6 changes: 6 additions & 0 deletions link_src/nvim/lua/custom/plugins/lsp-format-modifications.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
return {
'PandaTinker/lsp-format-modifications.nvim',
dependencies = {
'nvim-lua/plenary.nvim'
},
}

This file was deleted.

16 changes: 16 additions & 0 deletions link_src/nvim/lua/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,20 @@ vim.api.nvim_create_autocmd('TextYankPost', {
end,
})

-- flash

-- vim.keymap.set
-- keys = {
-- { "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
-- { "S", mode = { "n", "x", "o" }, 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" },
-- Explicitly call vim.keymap.set with each key mapping
vim.keymap.set({ "n", "x", "o" }, "z", function() require("flash").jump() end, { desc = "Flash" })
vim.keymap.set({ "n", "x", "o" }, "Z", function() require("flash").treesitter() end, { desc = "Flash Treesitter" })
vim.keymap.set("o", "r", function() require("flash").remote() end, { desc = "Remote Flash" })
vim.keymap.set({ "o", "x" }, "R", function() require("flash").treesitter_search() end, { desc = "Treesitter Search" })
vim.keymap.set("c", "<c-s>", function() require("flash").toggle() end, { desc = "Toggle Flash Search" })

-- vim: ts=2 sts=2 sw=2 et
17 changes: 8 additions & 9 deletions link_src/nvim/lua/kickstart/plugins/lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ return {

-- Useful status updates for LSP.
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ 'j-hui/fidget.nvim', opts = {} },
{ 'j-hui/fidget.nvim', opts = {} },

-- `neodev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis
{ 'folke/neodev.nvim', opts = {} },
{ 'folke/neodev.nvim', opts = {} },
},
config = function()
-- Brief aside: **What is LSP?**
Expand Down Expand Up @@ -99,10 +99,9 @@ return {
map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')

local client = vim.lsp.get_client_by_id(event.data.client_id)
-- for auto formatting on save
local augroup_id = vim.api.nvim_create_augroup(
"FormatModificationDocumentFormattingGroup",
{clear = false}
"FormatModificationsDocumentFormattingGroup",
{ clear = false }
)
vim.api.nvim_clear_autocmds({ group = augroup_id, buffer = event.buf })

Expand All @@ -111,13 +110,13 @@ return {
{
group = augroup_id,
buffer = event.buf,
callback = function ()
local lsp_format_modifications = require("lsp-formate-modifications")
lsp_format_modifications.format_modifications(client, event.buf)
callback = function()
local lsp_format_modifications = require "lsp-format-modifications"
lsp_format_modifications.format_modifications(client, event.buf,
{ experimental_empty_line_handling = true })
end,
}
)

-- The following two autocommands are used to highlight references of the
-- word under your cursor when your cursor rests there for a little while.
-- See `:help CursorHold` for information about when this is executed
Expand Down
6 changes: 5 additions & 1 deletion link_src/nvim/lua/kickstart/plugins/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ return {
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
opts = {
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc' },
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc', 'python' },
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {
Expand Down Expand Up @@ -31,5 +31,9 @@ return {
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
end,
},
{
'nvim-treesitter/nvim-treesitter-textobjects',
dependencies = { 'nvim-treesitter/nvim-treesitter' }
}
}
-- vim: ts=2 sts=2 sw=2 et
4 changes: 3 additions & 1 deletion link_src/nvim/lua/lazy-plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ require('lazy').setup({
-- require('Comment').setup({})

-- "gc" to comment visual regions/lines
{ 'numToStr/Comment.nvim', opts = {} },
{ 'numToStr/Comment.nvim', opts = {
padding = true,
} },

-- modular approach: using `require 'path/name'` will
-- include a plugin definition from file lua/path/name.lua
Expand Down
2 changes: 2 additions & 0 deletions link_src/nvim/lua/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,6 @@ vim.opt.cursorline = true
-- Minimal number of screen lines to keep above and below the cursor.
vim.opt.scrolloff = 10

-- Recommended session config for session from auto-session
vim.opt.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
-- vim: ts=2 sts=2 sw=2 et

0 comments on commit 756998e

Please sign in to comment.