nvim: cleanup

This commit is contained in:
Maciej Jur 2024-05-21 20:03:32 +02:00
parent 8a35edbca0
commit 88aaa57386
Signed by: kamov
GPG key ID: 191CBFF5F72ECAFD
4 changed files with 37 additions and 64 deletions

View file

@ -3,11 +3,12 @@
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"diffview.nvim": { "branch": "main", "commit": "9bdd5537575c2ea7925b71ae06585b934beea13d" }, "diffview.nvim": { "branch": "main", "commit": "ad03c42b2899117ff039d84ac24860a77116204b" },
"dropbar.nvim": { "branch": "master", "commit": "9fc10fa1a34ec3e55b470962e4e94644611bd209" },
"gitsigns.nvim": { "branch": "main", "commit": "805610a9393fa231f2c2b49cb521bfa413fadb3d" }, "gitsigns.nvim": { "branch": "main", "commit": "805610a9393fa231f2c2b49cb521bfa413fadb3d" },
"haskell-tools.nvim": { "branch": "master", "commit": "35ac2d964b004d0d0e0cc9bab039b70be36ca0f7" }, "haskell-tools.nvim": { "branch": "master", "commit": "35ac2d964b004d0d0e0cc9bab039b70be36ca0f7" },
"kanagawa.nvim": { "branch": "master", "commit": "860e4f80df71221d18bf2cd9ef1deb4d364274d2" }, "kanagawa.nvim": { "branch": "master", "commit": "860e4f80df71221d18bf2cd9ef1deb4d364274d2" },
"lazy.nvim": { "branch": "main", "commit": "0de782a6b0ffba599dbd332a4019d852564bf28c" }, "lazy.nvim": { "branch": "main", "commit": "9895337d1f4c0cea1186d92148e3d80f6551eda8" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "67210c0e775adec55de9826b038e8b62de554afc" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "67210c0e775adec55de9826b038e8b62de554afc" },
@ -16,13 +17,14 @@
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" }, "nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
"nvim-dap": { "branch": "master", "commit": "5a2f7121869394502521c52b2bc581ab22c69447" }, "nvim-dap": { "branch": "master", "commit": "5a2f7121869394502521c52b2bc581ab22c69447" },
"nvim-dap-ui": { "branch": "master", "commit": "71bfe9bd6b3465e169b53bea4f83775034d822dd" }, "nvim-dap-ui": { "branch": "master", "commit": "334cf3038c4756e6ab999cbac67c847fb654c190" },
"nvim-lspconfig": { "branch": "master", "commit": "9bda20fb967075355f253911bc066a8b5a03c77e" }, "nvim-lspconfig": { "branch": "master", "commit": "0b8165cf95806bc4bb8f745bb0c92021b2ed4b98" },
"nvim-nio": { "branch": "master", "commit": "8765cbc4d0c629c8158a5341e1b4305fd93c3a90" }, "nvim-nio": { "branch": "master", "commit": "8765cbc4d0c629c8158a5341e1b4305fd93c3a90" },
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
"nvim-treesitter": { "branch": "master", "commit": "7c9c5bed8340031f8a6dad47a58a26eaf15b9a56" }, "nvim-treesitter": { "branch": "master", "commit": "73fb37ed77b18ac357ca8e6e35835a8db6602332" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5f9bf4b1ead7707e4e74e5319ee56bdc81fb73db" },
"nvim-web-devicons": { "branch": "master", "commit": "e37bb1feee9e7320c76050a55443fa843b4b6f83" }, "nvim-web-devicons": { "branch": "master", "commit": "e37bb1feee9e7320c76050a55443fa843b4b6f83" },
"plenary.nvim": { "branch": "master", "commit": "b5c8de02a44ffeabff678090edd6a132ff8ab77d" }, "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"rustaceanvim": { "branch": "master", "commit": "bc8c4b8f7606d5b7c067cd8369e25c1a7ff77bd0" }, "rustaceanvim": { "branch": "master", "commit": "bc8c4b8f7606d5b7c067cd8369e25c1a7ff77bd0" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope.nvim": { "branch": "0.1.x", "commit": "d829aa64059001ee7b2c8c8aa9c4e6df0b17d893" }, "telescope.nvim": { "branch": "0.1.x", "commit": "d829aa64059001ee7b2c8c8aa9c4e6df0b17d893" },

View file

@ -1,16 +1,14 @@
local is, when = require 'config.compose' ()
local map = require 'config.helpers.keymap' local map = require 'config.helpers.keymap'
local n = map 'n' local n = map 'n'
local nv = map { 'n', 'v' } local nv = map { 'n', 'v' }
---@type LazySpec ---@type LazyPluginSpec[]
return { return {
-- Theme -- Theme
{ {
'rebelot/kanagawa.nvim', 'rebelot/kanagawa.nvim',
enabled = is 'standalone',
lazy = false, lazy = false,
priority = math.huge, priority = math.huge,
config = function() config = function()
@ -21,7 +19,6 @@ return {
-- Status line -- Status line
{ {
'nvim-lualine/lualine.nvim', 'nvim-lualine/lualine.nvim',
enabled = is 'standalone',
dependencies = { dependencies = {
'nvim-tree/nvim-web-devicons', 'nvim-tree/nvim-web-devicons',
}, },
@ -31,19 +28,18 @@ return {
-- Fuzzy search -- Fuzzy search
{ {
'nvim-telescope/telescope.nvim', 'nvim-telescope/telescope.nvim',
enabled = is 'standalone',
branch = '0.1.x', branch = '0.1.x',
dependencies = { dependencies = {
'nvim-lua/plenary.nvim', 'nvim-lua/plenary.nvim',
when 'linux' { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' } { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' }
}, },
config = function() config = function()
local telescope = require 'telescope' local telescope = require 'telescope'
local builtin = require 'telescope.builtin' local builtin = require 'telescope.builtin'
local ext = telescope.extensions local ext = telescope.extensions
if is 'linux' then telescope.load_extension 'fzf' end telescope.load_extension 'fzf'
if is 'standalone' then telescope.load_extension 'notify' end telescope.load_extension 'notify'
telescope.setup { telescope.setup {
extensions = { extensions = {
@ -61,10 +57,7 @@ return {
n '<leader>fg' (builtin.live_grep) 'Telescope: grep' n '<leader>fg' (builtin.live_grep) 'Telescope: grep'
n '<leader>fh' (builtin.help_tags) 'Telescope: docs' n '<leader>fh' (builtin.help_tags) 'Telescope: docs'
n '<Leader>fk' (builtin.keymaps) 'Telescope: keymaps' n '<Leader>fk' (builtin.keymaps) 'Telescope: keymaps'
n '<leader>fn' (ext.notify.notify) 'Telescope: notifications'
if is 'standalone' then
n '<leader>fn' (ext.notify.notify) 'Telescope: notifications'
end
end, end,
}, },
@ -73,22 +66,10 @@ return {
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate', build = ':TSUpdate',
dependencies = { dependencies = {
-- 'nvim-treesitter/nvim-treesitter-textobjects' 'nvim-treesitter/nvim-treesitter-textobjects'
}, },
config = function() config = function()
local configs = require 'nvim-treesitter.configs' local configs = require 'nvim-treesitter.configs'
local parsers = require('nvim-treesitter.parsers').get_parser_configs()
-- parsers['rescript'] = {
-- install_info = {
-- url = 'https://github.com/rescript-lang/tree-sitter-rescript',
-- branch = 'main',
-- files = { 'src/parser.c', 'src/scanner.c' },
-- generate_requires_npm = false,
-- requires_generate_from_grammar = true,
-- use_makefile = true,
-- },
-- }
configs.setup { configs.setup {
modules = {}, modules = {},
@ -97,7 +78,7 @@ return {
ignore_install = {}, ignore_install = {},
ensure_installed = { ensure_installed = {
-- neovim -- neovim
'vimdoc', 'lua', 'query', 'vimdoc', 'lua', 'query', 'fennel',
-- data -- data
'json', 'xml', 'yaml', 'toml', 'json', 'xml', 'yaml', 'toml',
-- markdown -- markdown
@ -161,7 +142,6 @@ return {
-- Keymap hints -- Keymap hints
{ {
'folke/which-key.nvim', 'folke/which-key.nvim',
enabled = is 'standalone',
init = function() init = function()
vim.o.timeout = true vim.o.timeout = true
vim.o.timeoutlen = 300 vim.o.timeoutlen = 300
@ -172,7 +152,6 @@ return {
-- Notifications -- Notifications
{ {
'rcarriga/nvim-notify', 'rcarriga/nvim-notify',
enabled = is 'standalone',
config = function() config = function()
vim.notify = require 'notify' vim.notify = require 'notify'
end end
@ -196,10 +175,17 @@ return {
end, end,
}, },
-- Breadcrumbs
{
'Bekaboo/dropbar.nvim',
dependencies = {
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' }
}
},
-- Git - file hunks -- Git - file hunks
{ {
'lewis6991/gitsigns.nvim', 'lewis6991/gitsigns.nvim',
enabled = is 'standalone',
config = function() config = function()
local gs = require 'gitsigns' local gs = require 'gitsigns'
@ -220,7 +206,6 @@ return {
-- Git - project diff -- Git - project diff
{ {
'sindrets/diffview.nvim', 'sindrets/diffview.nvim',
enabled = is 'standalone',
dependencies = { dependencies = {
'nvim-lua/plenary.nvim', 'nvim-lua/plenary.nvim',
'nvim-tree/nvim-web-devicons', 'nvim-tree/nvim-web-devicons',
@ -277,16 +262,9 @@ return {
config = require 'config.plugins.nvim-cmp' config = require 'config.plugins.nvim-cmp'
}, },
-- LS configs
{
'neovim/nvim-lspconfig',
enabled = is { 'standalone', 'linux' },
},
-- Debugger adapter support -- Debugger adapter support
{ {
'mfussenegger/nvim-dap', 'mfussenegger/nvim-dap',
enabled = is { 'standalone', 'linux' },
dependencies = { dependencies = {
'nvim-neotest/nvim-nio', 'nvim-neotest/nvim-nio',
'rcarriga/nvim-dap-ui', 'rcarriga/nvim-dap-ui',
@ -324,14 +302,12 @@ return {
-- Mason -- Mason
{ {
'williamboman/mason.nvim', 'williamboman/mason.nvim',
enabled = is { 'standalone', 'linux' },
config = true, config = true,
}, },
-- Automatic LSP server setup for Mason -- Automatic LSP server setup for Mason
{ {
'williamboman/mason-lspconfig.nvim', 'williamboman/mason-lspconfig.nvim',
enabled = is { 'standalone', 'linux' },
dependencies = { dependencies = {
'williamboman/mason.nvim', 'williamboman/mason.nvim',
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',
@ -345,22 +321,22 @@ return {
config.setup { config.setup {
automatic_installation = true, automatic_installation = true,
-- NOTE: Haskell is managed via GHCup -- NOTE: hls is installed via GHCup
ensure_installed = { ensure_installed = {
'lua_ls', -- Lua 'lua_ls', -- Lua
'fennel_ls', -- Fennel
'rust_analyzer', -- Rust 'rust_analyzer', -- Rust
-- 'clangd', -- C -- 'clangd', -- C
-- 'bashls', -- Bash -- 'bashls', -- Bash
'html', -- HTML 'html', -- HTML
'cssls', -- CSS / SCSS 'cssls', -- CSS / SCSS
'tsserver', -- TypeScript 'tsserver', -- TypeScript
-- 'astro', -- Astro
-- 'svelte', -- Svelte -- 'svelte', -- Svelte
-- 'pyright', -- Python -- 'pyright', -- Python
-- 'rnix', -- Nix -- 'rnix', -- Nix
-- 'purescriptls', -- Purescript -- 'purescriptls', -- Purescript
'ltex', -- Literate - LaTeX, Markdown, etc. 'ltex', -- Literate - LaTeX, Markdown, etc.
'rescriptls', -- ReScript -- 'rescriptls', -- ReScript
}, },
} }
@ -371,7 +347,8 @@ return {
capabilities = cmp.default_capabilities(), capabilities = cmp.default_capabilities(),
} }
end, end,
['rust_analyzer'] = noop, ['rust_analyzer'] = noop, -- this is started by rustaceanvim
['lua_ls'] = noop, -- this is started by neodev
} }
local signs = { local signs = {
@ -391,7 +368,6 @@ return {
-- Automatic debugger install -- Automatic debugger install
{ {
'jay-babu/mason-nvim-dap.nvim', 'jay-babu/mason-nvim-dap.nvim',
enabled = is { 'standalone', 'linux' },
dependencies = { dependencies = {
'mfussenegger/nvim-dap', 'mfussenegger/nvim-dap',
'williamboman/mason.nvim', 'williamboman/mason.nvim',
@ -412,7 +388,6 @@ return {
-- Tools for Neovim -- Tools for Neovim
{ {
'folke/neodev.nvim', 'folke/neodev.nvim',
enabled = is { 'standalone', 'linux' },
ft = 'lua', ft = 'lua',
dependencies = { dependencies = {
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',
@ -433,7 +408,6 @@ return {
-- Tools for Rust -- Tools for Rust
{ {
'mrcjkb/rustaceanvim', 'mrcjkb/rustaceanvim',
enabled = is { 'standalone', 'linux' },
version = '^3', version = '^3',
ft = { 'rust' }, ft = { 'rust' },
init = function() init = function()
@ -444,7 +418,6 @@ return {
-- Tools for Haskell -- Tools for Haskell
{ {
'mrcjkb/haskell-tools.nvim', 'mrcjkb/haskell-tools.nvim',
enabled = is { 'standalone', 'linux' },
version = '^3', version = '^3',
ft = { 'haskell', 'lhaskell', 'cabal', 'cabalproject' }, ft = { 'haskell', 'lhaskell', 'cabal', 'cabalproject' },
dependencies = { dependencies = {

View file

@ -13,15 +13,15 @@ return function()
documentation = cmp.config.window.bordered(), documentation = cmp.config.window.bordered(),
}, },
mapping = cmp.mapping.preset.insert { mapping = cmp.mapping.preset.insert {
['<Tab>'] = cmp.mapping(function(fallback) -- ['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then -- if cmp.visible() then
cmp.select_next_item() -- cmp.select_next_item()
elseif vim.snippet.jumpable(1) then -- elseif vim.snippet.jumpable(1) then
vim.snippet.jump(1) -- vim.snippet.jump(1)
else -- else
fallback() -- fallback()
end -- end
end, { 'i', 's' }), -- end, { 'i', 's' }),
-- And something similar for vim.snippet.jump(-1) -- And something similar for vim.snippet.jump(-1)
['<C-b>'] = cmp.mapping.scroll_docs(-4), ['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4), ['<C-f>'] = cmp.mapping.scroll_docs(4),

View file

@ -12,8 +12,6 @@ end
local ok, err = pcall(require, 'config.manager') local ok, err = pcall(require, 'config.manager')
if not ok then if not ok then
vim.cmd 'colorscheme slate'
vim.schedule(function() vim.schedule(function()
vim.notify(err, vim.log.levels.ERROR) vim.notify(err, vim.log.levels.ERROR)
end) end)