Skip to content

Commit

Permalink
Merge pull request #43 from daler/stickybuf
Browse files Browse the repository at this point in the history
add stickybuf and lsp-progress plugins
  • Loading branch information
daler committed Apr 27, 2024
2 parents 056247f + 9d541a7 commit 7995e38
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 35 deletions.
117 changes: 82 additions & 35 deletions .config/nvim/lua/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ return {
{ "daler/vim-python-pep8-indent", ft = { "python", "snakemake" } }, -- better indentation for python
{ "samoshkin/vim-mergetool", cmd = "MergetoolStart" }, -- easily work with 3-way merge conflicts
{ "tpope/vim-fugitive", cmd = "Git", lazy = true }, -- convenient git interface, with incremental commits
{ "junegunn/gv.vim", cmd = "GV", dependencies = {"tpope/vim-fugitive"}, lazy = true}, -- graphical git log
{ "junegunn/gv.vim", cmd = "GV", dependencies = { "tpope/vim-fugitive" }, lazy = true }, -- graphical git log
{ "sindrets/diffview.nvim", cmd = { "DiffviewOpen", "DiffviewFileHistory" } }, -- nice diff interface
{ "folke/which-key.nvim", lazy = false, config = true, }, -- pop up a window showing possible keybindings
{ "folke/which-key.nvim", lazy = false, config = true }, -- pop up a window showing possible keybindings
{ "daler/zenburn.nvim", lazy = false, priority = 1000 }, -- colorscheme
{ "morhetz/gruvbox", enabled = false }, -- example of an alternative colorscheme, here disabled
{ "joshdick/onedark.vim", lazy = false }, -- another colorscheme, here enabled as a fallback for terminals with no true-color support like Terminal.app.
Expand Down Expand Up @@ -74,7 +74,7 @@ return {
{
"danilamihailov/beacon.nvim", -- flash a beacon to show where you are
lazy = false, -- otherwise, on first KJ you get a double-flash
config = function ()
config = function()
-- Disable the beacon globally; only the commands below will activate it.
vim.cmd("let g:beacon_enable=0")
end,
Expand Down Expand Up @@ -121,7 +121,6 @@ return {
vim.cmd("if &buftype == 'terminal' | startinsert | endif")
end,
})

end,
keys = {
{ "gxx", ":ToggleTermSendCurrentLine<CR><CR>", desc = "Send current line to terminal" },
Expand Down Expand Up @@ -188,8 +187,6 @@ return {
end,
},



{
"lukas-reineke/indent-blankline.nvim", -- show vertical lines at tabstops
lazy = false,
Expand Down Expand Up @@ -250,51 +247,61 @@ return {

{
"nvim-lualine/lualine.nvim", -- status line along the bottom
config = true,
opts = {
options = { theme = "zenburn" }, -- this theme is supplied by the zenburn.nvim plugin
sections = {
lualine_c = { {'filename', path = 2 }},
},

},


dependencies = {
"linrongbin16/lsp-progress.nvim",
},
config = function()
require("lualine").setup({
options = { theme = "zenburn" },
sections = {
lualine_c = { { "filename", path = 2 } },
lualine_x = {
function()
return require("lsp-progress").progress()
end,
},
},
})
end,
},

{
"akinsho/bufferline.nvim", config = true, lazy = false, -- tabs for buffers along the top
"akinsho/bufferline.nvim",
config = true,
lazy = false, -- tabs for buffers along the top
keys = {
{"<leader>b", "<cmd>BufferLinePick<CR>", desc = "Pick buffer"},
{ "<leader>b", "<cmd>BufferLinePick<CR>", desc = "Pick buffer" },
},
opts = {
options = {
right_mouse_command = "vertical sbufer %d",
separator_style = "slant",
hover = {
enabled = true, delay = 200, reveal = { "close" },
enabled = true,
delay = 200,
reveal = { "close" },
},
diagnostics = "nvim_lsp",
custom_filter = function(buf_number, buf_numbers)
if vim.bo[buf_number].filetype ~= "fugitive" then
return true
end
end
end,
show_buffer_icons = false,
offsets = {
{
filetype = "NvimTree",
highlight = "Directory",
separator = true,
},
{
filetype = "aerial",
highlight = "Directory",
separator = true,
{
filetype = "NvimTree",
highlight = "Directory",
separator = true,
},
{
filetype = "aerial",
highlight = "Directory",
separator = true,
},
},
},
},

},

{
Expand Down Expand Up @@ -401,7 +408,8 @@ return {
},
{
"williamboman/mason.nvim", -- convenient installation of LSP clients
lazy = false, config = true,
lazy = false,
config = true,
},
{
"neovim/nvim-lspconfig", -- convenient configuration of LSP clients
Expand Down Expand Up @@ -501,7 +509,7 @@ return {
prepend_args = { "-i", "2" },
},
stylua = {
prepend_args = { "--indent-type", "Spaces", "--indent-width", "2" }
prepend_args = { "--indent-type", "Spaces", "--indent-width", "2" },
},
},
init = function()
Expand All @@ -516,11 +524,50 @@ return {
event = "VeryLazy",
opts = {},
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" },
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
{
"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",
},
{
"<c-s>",
mode = { "c" },
function()
require("flash").toggle()
end,
desc = "Toggle Flash Search",
},
},
},

{
"stevearc/stickybuf.nvim", -- Prevents opening buffers in terminal buffer
opts = {},
config = function()
require("stickybuf").setup({
get_auto_pin = function(bufnr)
return require("stickybuf").should_auto_pin(bufnr)
end,
})
end,
},

{
"linrongbin16/lsp-progress.nvim", -- Adds LSP status to the bottom line so you know it's running
config = function()
require("lsp-progress").setup()
end,
},
}
-- vim: nowrap
7 changes: 7 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
Changelog
=========
2024-04-27
----------

**vim/nvim**

- new plugin, *stickybuf.nvim*, which prevents buffers from opening inside a terminal window
- new plugin, *lsp-progress.nvim*, which add LSP status to the lualine at the bottom

2024-03-31
----------
Expand Down
21 changes: 21 additions & 0 deletions docs/vim.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1448,6 +1448,27 @@ support for plugins and tweaks some of the existing colors to work better.

No additional commands configured.

``stickybuf.nvim``
~~~~~~~~~~~~~~~~~~

.. versionadded:: 2024-04-27

`stickybuf.nvim <https://github.com/stevearc/stickybuf.nvim>`__ prevents text
buffers from opening up inside a terminal buffer.

No additional commands configured.

``lsp-progress.nvim``
~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 2024-04-27

`lsp-progress.nvim <https://github.com/linrongbin16/lsp-progress.nvim>`__ adds
a status/progress indicator to the lualine (at the bottom of a window) so you
know when it's running.

No additional commands configured.

Colorschemes
------------

Expand Down

0 comments on commit 7995e38

Please sign in to comment.