droped none-ls
This commit is contained in:
1 parent
c3d41436a1
commit
847238c1bc
17 files changed
+590
-604
No files matched your search
@@ -0,0 +1,7 @@
|
|||||||
|
call_parentheses = "Always"
|
||||||
|
collapse_simple_statement = "Never"
|
||||||
|
column_width = 120
|
||||||
|
indent_type = "Spaces"
|
||||||
|
indent_width = 4
|
||||||
|
line_endings = "Unix"
|
||||||
|
quote_style = "AutoPreferSingle"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"distribution": "custom", "masonTools": ["actionlint", "bash-language-server", "biome", "black", "clang-format", "clangd", "emmet-ls", "eslint_d", "google-java-format", "graphql-lsp", "hadolint", "isort", "jdtls", "lua-language-server", "markdownlint", "prettier", "prettierd", "pylint", "pylsp", "pyright", "pyright-langserver", "selene", "shfmt", "stylua", "tailwindcss-language-server", "trivy", "typescript-language-server", "typos-lsp", "vim-language-server", "vint", "vscode-css-language-server", "vscode-eslint-language-server", "vscode-html-language-server", "vscode-json-language-server"], "plugins": ["2kabhishek/nerdy.nvim", "2kabhishek/tdo.nvim", "2kabhishek/termim.nvim", "CRAG666/code_runner.nvim", "Exafunction/codeium.vim", "HiPhish/rainbow-delimiters.nvim", "L3MON4D3/LuaSnip", "LudoPinelli/comment-box.nvim", "LunarVim/bigfile.nvim", "MunifTanjim/nui.nvim", "NStefan002/screenkey.nvim", "ThePrimeagen/refactoring.nvim", "WhoIsSethDaniel/mason-tool-installer.nvim", "akinsho/toggleterm.nvim", "altermo/ultimate-autopair.nvim", "antosha417/nvim-lsp-file-operations", "creativenull/dotfyle-metadata.nvim", "debugloop/telescope-undo.nvim", "echasnovski/mini.files", "echasnovski/mini.icons", "echasnovski/mini.nvim", "folke/flash.nvim", "folke/lazy.nvim", "folke/noice.nvim", "folke/persistence.nvim", "folke/trouble.nvim", "folke/which-key.nvim", "folke/zen-mode.nvim", "gbprod/yanky.nvim", "hrsh7th/cmp-buffer", "hrsh7th/cmp-cmdline", "hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-nvim-lsp-signature-help", "hrsh7th/cmp-nvim-lua", "hrsh7th/cmp-path", "hrsh7th/nvim-cmp", "iamcco/markdown-preview.nvim", "kristijanhusak/vim-dadbod-completion", "kristijanhusak/vim-dadbod-ui", "lukas-reineke/indent-blankline.nvim", "m-demare/hlargs.nvim", "m4xshen/hardtime.nvim", "max397574/better-escape.nvim", "mfussenegger/nvim-dap", "mfussenegger/nvim-lint", "mg979/vim-visual-multi", "mstuttgart/odoo-snippets", "mvllow/modes.nvim", "nacro90/numb.nvim", "navarasu/onedark.nvim", "neovim/nvim-lspconfig", "numToStr/Navigator.nvim", "nvim-lua/plenary.nvim", "nvim-lualine/lualine.nvim", "nvim-neo-tree/neo-tree.nvim", "nvim-neotest/neotest", "nvim-neotest/neotest-jest", "nvim-neotest/neotest-python", "nvim-neotest/nvim-nio", "nvim-pack/nvim-spectre", "nvim-telescope/telescope-file-browser.nvim", "nvim-telescope/telescope-fzf-native.nvim", "nvim-telescope/telescope-symbols.nvim", "nvim-telescope/telescope-ui-select.nvim", "nvim-telescope/telescope.nvim", "nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter-context", "nvim-treesitter/nvim-treesitter-textobjects", "nvimdev/dashboard-nvim", "nvimdev/lspsaga.nvim", "olimorris/neotest-rspec", "onsails/lspkind.nvim", "rafamadriz/friendly-snippets", "rcarriga/nvim-dap-ui", "rcarriga/nvim-notify", "saadparwaiz1/cmp_luasnip", "smjonas/inc-rename.nvim", "stevearc/conform.nvim", "stevearc/dressing.nvim", "szw/vim-maximizer", "tpope/vim-dadbod", "wakatime/vim-wakatime", "williamboman/mason-lspconfig.nvim", "williamboman/mason.nvim", "willothy/flatten.nvim", "windwp/nvim-ts-autotag", "zapling/mason-lock.nvim"], "keymaps": [{"desc": "Next Buffer", "noremap": true, "lhs": "<Tab>", "mode": "n", "rhs": "<Cmd>bnext<CR>"}, {"desc": "Escape and clear hlsearch", "noremap": true, "lhs": "<Esc>", "mode": "n", "rhs": "<Cmd>noh<CR><Esc>"}, {"desc": "Lspsaga | Code Outline", "noremap": true, "lhs": "<Space>lo", "mode": "n", "rhs": "<Cmd>Lspsaga outline<CR>"}, {"desc": "Copy Git URL", "noremap": true, "lhs": "<Space>yg", "mode": "n", "rhs": "<Cmd>lua require\"gitlinker\".get_buf_range_url()<CR>"}, {"desc": "File Name", "noremap": true, "lhs": "<Space>yf", "mode": "n", "rhs": "<Cmd>CopyFileName<CR>"}, {"desc": "Copy Whole File", "noremap": true, "lhs": "<Space>ya", "mode": "n", "rhs": "<Cmd>%y+<CR>"}, {"desc": "Absolute Path", "noremap": true, "lhs": "<Space>yP", "mode": "n", "rhs": "<Cmd>CopyAbsolutePath<CR>"}, {"desc": "Relative Path", "noremap": true, "lhs": "<Space>yp", "mode": "n", "rhs": "<Cmd>CopyRelativePath<CR>"}, {"desc": "Float File Explorer", "noremap": true, "lhs": "<Space>ee", "mode": "n", "rhs": ":Neotree toggle float<CR>"}, {"desc": " Left File Explorer", "noremap": true, "lhs": "<Space><Tab>", "mode": "n", "rhs": ":Neotree toggle left<CR>"}, {"desc": "Restore Last Session", "noremap": true, "lhs": "<Space>ml", "mode": "n", "rhs": "<function>"}, {"desc": "Restore Session", "noremap": true, "lhs": "<Space>ms", "mode": "n", "rhs": "<function>"}, {"desc": "Don't Save Current Session", "noremap": true, "lhs": "<Space>md", "mode": "n", "rhs": "<function>"}, {"desc": "Toggle IA (Codeium)", "noremap": true, "lhs": "<Space>cI", "mode": "n", "rhs": "<Cmd>CodeiumToggle<CR>"}, {"desc": "Command History", "noremap": true, "lhs": "<Space>kh", "mode": "n", "rhs": "<Cmd>Telescope command_history<CR>"}, {"desc": "Commands", "noremap": true, "lhs": "<Space>kc", "mode": "n", "rhs": "<Cmd>Telescope commands<CR>"}, {"desc": "Keymaps", "noremap": true, "lhs": "<Space>kk", "mode": "n", "rhs": "<Cmd>Telescope keymapLine truncated
|
||||||
+81
-87
@@ -1,90 +1,84 @@
|
|||||||
local cmp = require('cmp')
|
local cmp = require("cmp")
|
||||||
local luasnip = require('luasnip')
|
local luasnip = require("luasnip")
|
||||||
require('luasnip/loaders/from_vscode').lazy_load()
|
local lspkind = require("lspkind")
|
||||||
|
require("luasnip/loaders/from_vscode").lazy_load()
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
completion = {
|
completion = {
|
||||||
keyword_length = 1,
|
completeopt = "menu,menuone,preview,noselect",
|
||||||
completeopt = 'menu,menuone',
|
},
|
||||||
},
|
window = { -- making ui stuff for completion bordered
|
||||||
window = {
|
completion = cmp.config.window.bordered(),
|
||||||
completion = cmp.config.window.bordered(),
|
documentation = cmp.config.window.bordered(),
|
||||||
documentation = cmp.config.window.bordered(),
|
},
|
||||||
},
|
-- configure lspkind for vs-code like pictograms in completion menu
|
||||||
formatting = {
|
formatting = {
|
||||||
fields = { 'kind', 'abbr', 'menu' },
|
format = lspkind.cmp_format({
|
||||||
format = function(entry, vim_item)
|
maxwidth = 50,
|
||||||
local kind = require('lspkind').cmp_format({ mode = 'symbol_text', maxwidth = 50 })(entry, vim_item)
|
ellipsis_char = "...",
|
||||||
local strings = vim.split(kind.kind, '%s', { trimempty = true })
|
}),
|
||||||
kind.kind = ' ' .. (strings[1] or '') .. ' '
|
},
|
||||||
kind.menu = ' (' .. (strings[2] or '') .. ')'
|
snippet = { -- configure how nvim-cmp interacts with snippet engine
|
||||||
|
expand = function(args)
|
||||||
return kind
|
luasnip.lsp_expand(args.body)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
snippet = { -- configure how nvim-cmp interacts with snippet engine
|
mapping = {
|
||||||
expand = function(args)
|
["<C-k>"] = cmp.mapping.select_prev_item(), -- previous suggestion
|
||||||
luasnip.lsp_expand(args.body)
|
["<C-j>"] = cmp.mapping.select_next_item(), -- next suggestion
|
||||||
end,
|
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||||
},
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
mapping = {
|
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
|
||||||
['<C-k>'] = cmp.mapping.select_prev_item(),
|
["<C-y>"] = cmp.config.disable,
|
||||||
['<C-j>'] = cmp.mapping.select_next_item(),
|
["<C-c>"] = cmp.mapping({ -- close completion window
|
||||||
['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-1), { 'i', 'c' }),
|
i = cmp.mapping.abort(),
|
||||||
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(1), { 'i', 'c' }),
|
c = cmp.mapping.close(),
|
||||||
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
|
}),
|
||||||
['<C-u>'] = cmp.mapping.scroll_docs(-4),
|
["<CR>"] = cmp.mapping.confirm({
|
||||||
['<C-d>'] = cmp.mapping.scroll_docs(4),
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
['<C-y>'] = cmp.config.disable,
|
select = false,
|
||||||
['<C-c>'] = cmp.mapping({
|
}),
|
||||||
i = cmp.mapping.abort(),
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
c = cmp.mapping.close(),
|
if cmp.visible() then
|
||||||
}),
|
cmp.select_next_item()
|
||||||
['<CR>'] = cmp.mapping.confirm({
|
elseif luasnip.expandable() then
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
luasnip.expand()
|
||||||
select = false,
|
elseif luasnip.expand_or_jumpable() then
|
||||||
}),
|
luasnip.expand_or_jump()
|
||||||
['<Tab>'] = cmp.mapping(function(fallback)
|
else
|
||||||
if cmp.visible() then
|
fallback()
|
||||||
cmp.select_next_item()
|
end
|
||||||
elseif luasnip.expandable() then
|
end, { "i", "s" }),
|
||||||
luasnip.expand()
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
elseif luasnip.expand_or_jumpable() then
|
if cmp.visible() then
|
||||||
luasnip.expand_or_jump()
|
cmp.select_prev_item()
|
||||||
else
|
elseif luasnip.jumpable(-1) then
|
||||||
fallback()
|
luasnip.jump(-1)
|
||||||
end
|
else
|
||||||
end, { 'i', 's' }),
|
fallback()
|
||||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
end
|
||||||
if cmp.visible() then
|
end, { "i", "s" }),
|
||||||
cmp.select_prev_item()
|
},
|
||||||
elseif luasnip.jumpable(-1) then
|
cmp.setup.cmdline(":", {
|
||||||
luasnip.jump(-1)
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
else
|
sources = {
|
||||||
fallback()
|
{ name = "cmdline" },
|
||||||
end
|
},
|
||||||
end, { 'i', 's' }),
|
}),
|
||||||
},
|
-- cmp.setup.cmdline("/", {
|
||||||
cmp.setup.cmdline(':', {
|
-- mapping = cmp.mapping.preset.cmdline(),
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
-- sources = {
|
||||||
sources = {
|
-- { name = "buffer" },
|
||||||
{ name = 'cmdline' },
|
-- },
|
||||||
},
|
-- }),
|
||||||
}),
|
-- sources for autocompletion
|
||||||
cmp.setup.cmdline('/', {
|
sources = {
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
{ name = "nvim_lsp" },
|
||||||
sources = {
|
{ name = "nvim_lsp_signature_help" }, -- parameter hints
|
||||||
{ name = 'buffer' },
|
{ name = "luasnip" }, -- snippets
|
||||||
},
|
{ name = "buffer" }, -- text within current buffer
|
||||||
}),
|
{ name = "path" }, -- file system paths
|
||||||
-- sources for autocompletion
|
{ name = "codeium" }, -- AI for autocompletion
|
||||||
sources = {
|
-- { name = "calc" }, --for maths calculations
|
||||||
{ name = 'nvim_lsp' },
|
},
|
||||||
{ name = 'luasnip' }, -- snippets
|
|
||||||
{ name = 'buffer' }, -- text within current buffer
|
|
||||||
{ name = 'path' }, -- file system paths
|
|
||||||
{ name = 'codeium' }, -- AI for autocompletion
|
|
||||||
-- { name = "nvim_lsp_signature_help" },
|
|
||||||
-- { name = "calc" }, --for maths calculations
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
+55
-106
@@ -1,7 +1,8 @@
|
|||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
-- import cmp-nvim-lsp plugin
|
-- import cmp-nvim-lsp plugin
|
||||||
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||||
|
-- import mason_lspconfig plugin
|
||||||
|
local mason_lspconfig = require("mason-lspconfig")
|
||||||
local keymap = vim.keymap -- for conciseness
|
local keymap = vim.keymap -- for conciseness
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
@@ -18,6 +19,14 @@ vim.api.nvim_create_autocmd("LspAttach", {
|
|||||||
opts.desc = "Go to declaration"
|
opts.desc = "Go to declaration"
|
||||||
keymap.set("n", "lD", vim.lsp.buf.declaration, opts) -- go to declaration
|
keymap.set("n", "lD", vim.lsp.buf.declaration, opts) -- go to declaration
|
||||||
|
|
||||||
|
opts.desc = "Inlay hint"
|
||||||
|
keymap.set(
|
||||||
|
"n",
|
||||||
|
"<leader>lh",
|
||||||
|
"<cmd>lua vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())<CR>",
|
||||||
|
opts
|
||||||
|
)
|
||||||
|
|
||||||
opts.desc = "Show LSP definitions"
|
opts.desc = "Show LSP definitions"
|
||||||
keymap.set("n", "ld", "<cmd>Telescope lsp_definitions<CR>", opts) -- show lsp definitions
|
keymap.set("n", "ld", "<cmd>Telescope lsp_definitions<CR>", opts) -- show lsp definitions
|
||||||
|
|
||||||
@@ -28,10 +37,10 @@ vim.api.nvim_create_autocmd("LspAttach", {
|
|||||||
keymap.set("n", "lt", "<cmd>Telescope lsp_type_definitions<CR>", opts) -- show lsp type definitions
|
keymap.set("n", "lt", "<cmd>Telescope lsp_type_definitions<CR>", opts) -- show lsp type definitions
|
||||||
|
|
||||||
opts.desc = "See available code actions"
|
opts.desc = "See available code actions"
|
||||||
keymap.set({ "n", "v" }, "<leader>la", vim.lsp.buf.code_action, opts) -- see available code actions, in visual mode will apply to selection
|
keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts) -- see available code actions, in visual mode will apply to selection
|
||||||
|
|
||||||
opts.desc = "Smart rename"
|
opts.desc = "Smart rename"
|
||||||
keymap.set("n", "<leader>mr", vim.lsp.buf.rename, opts) -- smart rename
|
keymap.set("n", "<leader>mR", vim.lsp.buf.rename, opts) -- smart rename
|
||||||
|
|
||||||
opts.desc = "Show buffer diagnostics"
|
opts.desc = "Show buffer diagnostics"
|
||||||
keymap.set("n", "<leader>lD", "<cmd>Telescope diagnostics bufnr=0<CR>", opts) -- show diagnostics for file
|
keymap.set("n", "<leader>lD", "<cmd>Telescope diagnostics bufnr=0<CR>", opts) -- show diagnostics for file
|
||||||
@@ -50,111 +59,51 @@ vim.api.nvim_create_autocmd("LspAttach", {
|
|||||||
-- used to enable autocompletion (assign to every lsp server config)
|
-- used to enable autocompletion (assign to every lsp server config)
|
||||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||||
|
|
||||||
-- configure matlab server
|
-- Change the Diagnostic symbols in the sign column (gutter)
|
||||||
lspconfig["clangd"].setup({
|
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
||||||
capabilities = capabilities,
|
for type, icon in pairs(signs) do
|
||||||
})
|
local hl = "DiagnosticSign" .. type
|
||||||
-- configure bash server
|
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
|
||||||
lspconfig["bashls"].setup({
|
end
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
-- configure html server
|
|
||||||
lspconfig["html"].setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
-- configure typescript server with plugin
|
|
||||||
lspconfig["tsserver"].setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- configure css server
|
mason_lspconfig.setup_handlers({
|
||||||
lspconfig["cssls"].setup({
|
-- default handler for installed servers
|
||||||
capabilities = capabilities,
|
function(server_name)
|
||||||
})
|
lspconfig[server_name].setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
|
||||||
-- configure tailwindcss server
|
["lua_ls"] = function()
|
||||||
lspconfig["tailwindcss"].setup({
|
-- configure lua server (with special settings)
|
||||||
capabilities = capabilities,
|
lspconfig["lua_ls"].setup({
|
||||||
})
|
capabilities = capabilities,
|
||||||
|
settings = {
|
||||||
-- configure svelte server
|
Lua = {
|
||||||
lspconfig["svelte"].setup({
|
-- make the language server recognize "vim" global
|
||||||
capabilities = capabilities,
|
diagnostics = {
|
||||||
on_attach = function(client, bufnr)
|
globals = { "vim" },
|
||||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
},
|
||||||
pattern = { "*.js", "*.ts" },
|
hint = { enable = true },
|
||||||
callback = function(ctx)
|
completion = {
|
||||||
if client.name == "svelte" then
|
callSnippet = "Replace",
|
||||||
client.notify("$/onDidChangeTsOrJsFile", { uri = ctx.file })
|
},
|
||||||
end
|
},
|
||||||
end,
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
["basedpyright"] = function()
|
||||||
|
-- configure pyright server (with special settings)
|
||||||
|
lspconfig["basedpyright"].setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
settings = {
|
||||||
|
python = {
|
||||||
|
hint = { enable = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
handlers = {
|
||||||
|
["textDocument/publishDiagnostics"] = function() end,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- configure prisma orm server
|
|
||||||
lspconfig["prismals"].setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- configure emmet language server
|
|
||||||
lspconfig["emmet_ls"].setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
filetypes = { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "svelte" },
|
|
||||||
})
|
|
||||||
|
|
||||||
-- configure python server
|
|
||||||
lspconfig["pyright"].setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- configure lua server (with special settings)
|
|
||||||
lspconfig["lua_ls"].setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
settings = { -- custom settings for lua
|
|
||||||
Lua = {
|
|
||||||
-- make the language server recognize "vim" global
|
|
||||||
diagnostics = {
|
|
||||||
globals = { "vim" },
|
|
||||||
},
|
|
||||||
workspace = {
|
|
||||||
-- make language server aware of runtime files
|
|
||||||
library = {
|
|
||||||
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
|
|
||||||
[vim.fn.stdpath("config") .. "/lua"] = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
local x = vim.diagnostic.severity
|
|
||||||
local config = {
|
|
||||||
-- Enable virtual text
|
|
||||||
virtual_text = { -- or false for disable
|
|
||||||
prefix = "", -- ■
|
|
||||||
suffix = "",
|
|
||||||
format = function(diagnostic)
|
|
||||||
local prefix = " "
|
|
||||||
local suffix = " "
|
|
||||||
-- return full message with custom prefix & suffix
|
|
||||||
return prefix .. diagnostic.message .. suffix
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
update_in_insert = true,
|
|
||||||
signs = { text = { [x.ERROR] = "", [x.WARN] = "", [x.HINT] = "", [x.INFO] = "" } },
|
|
||||||
underline = false,
|
|
||||||
severity_sort = true,
|
|
||||||
float = {
|
|
||||||
focusable = false,
|
|
||||||
style = "minimal",
|
|
||||||
border = "rounded",
|
|
||||||
source = "always",
|
|
||||||
header = "",
|
|
||||||
prefix = "",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.diagnostic.config(config)
|
|
||||||
-- add borders to lsp info window
|
|
||||||
require("lspconfig.ui.windows").default_options.border = "single"
|
|
||||||
+32
-38
@@ -1,48 +1,42 @@
|
|||||||
local mason = require("mason")
|
local mason = require('mason')
|
||||||
local mason_lspconfig = require("mason-lspconfig")
|
local mason_lspconfig = require('mason-lspconfig')
|
||||||
local mason_tool_installer = require("mason-tool-installer")
|
local mason_tool_installer = require('mason-tool-installer')
|
||||||
|
|
||||||
-- enable mason and configure icons
|
-- enable mason and configure icons
|
||||||
mason.setup({
|
mason.setup({
|
||||||
automatic_installation = true,
|
automatic_installation = true,
|
||||||
ui = {
|
ui = {
|
||||||
border = "rounded",
|
border = 'rounded',
|
||||||
icons = {
|
icons = {
|
||||||
package_installed = "✓",
|
package_installed = '✓',
|
||||||
package_pending = "➜",
|
package_pending = '➜',
|
||||||
package_uninstalled = "✗",
|
package_uninstalled = '✗',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
mason_lspconfig.setup({
|
mason_lspconfig.setup({
|
||||||
-- list of servers for mason to install
|
-- list of servers for mason to install
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"tsserver",
|
'tsserver',
|
||||||
"html",
|
'lua_ls',
|
||||||
"cssls",
|
'basedpyright',
|
||||||
"tailwindcss",
|
'jdtls',
|
||||||
"svelte",
|
'bashls',
|
||||||
"lua_ls",
|
'jsonls',
|
||||||
"pyright",
|
'clangd',
|
||||||
"jdtls",
|
},
|
||||||
"bashls",
|
|
||||||
"jsonls",
|
|
||||||
"clangd",
|
|
||||||
"emmet_ls",
|
|
||||||
"prismals",
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
mason_tool_installer.setup({
|
mason_tool_installer.setup({
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"prettier", -- prettier formatter
|
'prettier', -- prettier formatter
|
||||||
"biome", -- js formatter
|
'stylua', -- lua formatter
|
||||||
"stylua", -- lua formatter
|
'black', -- python formatter
|
||||||
"black", -- python formatter
|
'isort', -- python formatter
|
||||||
"isort", -- python formatter
|
'clang-format', -- c/c++ formatter
|
||||||
"clang-format", -- c/c++ formatter
|
'ruff', -- python linter
|
||||||
"pylint",
|
'mypy', -- type checking
|
||||||
"eslint_d",
|
'eslint_d', --js linter
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
+49
-48
@@ -1,63 +1,64 @@
|
|||||||
local mason_null_ls = require("mason-null-ls")
|
local mason_null_ls = require('mason-null-ls')
|
||||||
|
|
||||||
local null_ls = require("null-ls")
|
local null_ls = require('null-ls')
|
||||||
|
|
||||||
local null_ls_utils = require("null-ls.utils")
|
local null_ls_utils = require('null-ls.utils')
|
||||||
|
|
||||||
mason_null_ls.setup({
|
mason_null_ls.setup({
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"prettier", -- prettier formatter
|
'prettier', -- prettier formatter
|
||||||
"biome", -- js formatter
|
'clang-format', -- c/c++ formatter
|
||||||
"clang-format", -- c/c++ formatter
|
'stylua', -- lua formatter
|
||||||
"stylua", -- lua formatter
|
'black', -- python formatter
|
||||||
"black", -- python formatter
|
'pylint', -- python linter
|
||||||
"pylint", -- python linter
|
'google-java-format', -- java formatter
|
||||||
"google-java-format", -- java formatter
|
-- "eslint_d", -- js linter
|
||||||
-- "eslint_d", -- js linter
|
},
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- for conciseness
|
-- for conciseness
|
||||||
local formatting = null_ls.builtins.formatting -- to setup formatters
|
local formatting = null_ls.builtins.formatting -- to setup formatters
|
||||||
local diagnostics = null_ls.builtins.diagnostics -- to setup linters
|
local diagnostics = null_ls.builtins.diagnostics -- to setup linters
|
||||||
|
local hover = null_ls.builtins.hover
|
||||||
|
|
||||||
-- to setup format on save
|
-- to setup format on save
|
||||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
local augroup = vim.api.nvim_create_augroup('LspFormatting', {})
|
||||||
|
|
||||||
-- configure null_ls
|
-- configure null_ls
|
||||||
null_ls.setup({
|
null_ls.setup({
|
||||||
root_dir = null_ls_utils.root_pattern(".null-ls-root", "Makefile", ".git", "package.json"),
|
root_dir = null_ls_utils.root_pattern('.null-ls-root', 'Makefile', '.git', 'package.json'),
|
||||||
sources = {
|
sources = {
|
||||||
formatting.prettier, -- js/ts formatter
|
formatting.prettier, -- js/ts formatter
|
||||||
formatting.stylua, -- lua formatter
|
formatting.stylua, -- lua formatter
|
||||||
formatting.isort,
|
formatting.isort,
|
||||||
formatting.black,
|
formatting.black,
|
||||||
formatting.clang_format,
|
formatting.clang_format,
|
||||||
formatting.google_java_format,
|
formatting.google_java_format,
|
||||||
diagnostics.pylint,
|
diagnostics.pylint,
|
||||||
-- diagnostics.eslint_d.with({ -- js/ts linter
|
hover.printenv,
|
||||||
-- condition = function(utils)
|
-- diagnostics.eslint_d.with({ -- js/ts linter
|
||||||
-- return utils.root_has_file({ ".eslintrc.js", ".eslintrc.cjs" }) -- only enable if root has .eslintrc.js or .eslintrc.cjs
|
-- condition = function(utils)
|
||||||
-- end,
|
-- return utils.root_has_file({ ".eslintrc.js", ".eslintrc.cjs" }) -- only enable if root has .eslintrc.js or .eslintrc.cjs
|
||||||
-- }),
|
-- end,
|
||||||
},
|
-- }),
|
||||||
-- configure format on save
|
},
|
||||||
on_attach = function(current_client, bufnr)
|
-- configure format on save
|
||||||
if current_client.supports_method("textDocument/formatting") then
|
on_attach = function(current_client, bufnr)
|
||||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
if current_client.supports_method('textDocument/formatting') then
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||||
group = augroup,
|
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||||
buffer = bufnr,
|
group = augroup,
|
||||||
callback = function()
|
buffer = bufnr,
|
||||||
vim.lsp.buf.format({
|
callback = function()
|
||||||
filter = function(client)
|
vim.lsp.buf.format({
|
||||||
-- only use null-ls for formatting instead of lsp server
|
filter = function(client)
|
||||||
return client.name == "null-ls"
|
-- only use null-ls for formatting instead of lsp server
|
||||||
end,
|
return client.name == 'null-ls'
|
||||||
bufnr = bufnr,
|
end,
|
||||||
})
|
bufnr = bufnr,
|
||||||
end,
|
})
|
||||||
})
|
end,
|
||||||
end
|
})
|
||||||
end,
|
end
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
@@ -8,7 +8,7 @@ vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
|||||||
pattern = { "*" },
|
pattern = { "*" },
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.cmd([[ %s/\s\+$//e ]])
|
vim.cmd([[ %s/\s\+$//e ]])
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Check if we need to reload the file when it changed
|
-- Check if we need to reload the file when it changed
|
||||||
|
|||||||
+6
-4
@@ -6,12 +6,14 @@
|
|||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
"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-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
|
||||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||||
"code_runner.nvim": { "branch": "main", "commit": "6c5bfe44a6c7523350cd706e6b3b8101166eed99" },
|
"code_runner.nvim": { "branch": "main", "commit": "6c5bfe44a6c7523350cd706e6b3b8101166eed99" },
|
||||||
"codeium.vim": { "branch": "main", "commit": "8bed5fb5708c94cd69f418d1381d6fbf07cb0313" },
|
"codeium.vim": { "branch": "main", "commit": "8bed5fb5708c94cd69f418d1381d6fbf07cb0313" },
|
||||||
"comment-box.nvim": { "branch": "main", "commit": "06bb771690bc9df0763d14769b779062d8f12bc5" },
|
"comment-box.nvim": { "branch": "main", "commit": "06bb771690bc9df0763d14769b779062d8f12bc5" },
|
||||||
|
"conform.nvim": { "branch": "master", "commit": "62eba813b7501b39612146cbf29cd07f1d4ac29c" },
|
||||||
"dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" },
|
"dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" },
|
||||||
"dotfyle-metadata.nvim": { "branch": "main", "commit": "342ef8f3f98f3ccc451c9cf2be74e95149ced05d" },
|
"dotfyle-metadata.nvim": { "branch": "main", "commit": "342ef8f3f98f3ccc451c9cf2be74e95149ced05d" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "c5775a888adbc50652cb370073fcfec963eca93e" },
|
"dressing.nvim": { "branch": "master", "commit": "c5775a888adbc50652cb370073fcfec963eca93e" },
|
||||||
@@ -29,12 +31,11 @@
|
|||||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||||
"mason-lock.nvim": { "branch": "main", "commit": "86614f76c3442fba1c5c8d79aa1efcb3ad69de1c" },
|
"mason-lock.nvim": { "branch": "main", "commit": "86614f76c3442fba1c5c8d79aa1efcb3ad69de1c" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "482350b050bd413931c2cdd4857443c3da7d57cb" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "482350b050bd413931c2cdd4857443c3da7d57cb" },
|
||||||
"mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" },
|
|
||||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
|
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||||
"mini.files": { "branch": "main", "commit": "7ed15315247775b4c5fcfaf4c8fe45d3a0dde9ad" },
|
"mini.files": { "branch": "main", "commit": "7ed15315247775b4c5fcfaf4c8fe45d3a0dde9ad" },
|
||||||
"mini.icons": { "branch": "main", "commit": "12e7b5d47bfc1b4c5ba4278fb49ec9100138df14" },
|
"mini.icons": { "branch": "main", "commit": "12e7b5d47bfc1b4c5ba4278fb49ec9100138df14" },
|
||||||
"mini.nvim": { "branch": "main", "commit": "3cf9265bbde75d1358d126701eb6055034491df6" },
|
"mini.nvim": { "branch": "main", "commit": "2c55015a518e11ea9d49bb96078f5ede51f5d2af" },
|
||||||
"modes.nvim": { "branch": "main", "commit": "3188692abf02a8838ec75e59d68c2ce3e4323f5c" },
|
"modes.nvim": { "branch": "main", "commit": "3188692abf02a8838ec75e59d68c2ce3e4323f5c" },
|
||||||
"neo-tree.nvim": { "branch": "main", "commit": "206241e451c12f78969ff5ae53af45616ffc9b72" },
|
"neo-tree.nvim": { "branch": "main", "commit": "206241e451c12f78969ff5ae53af45616ffc9b72" },
|
||||||
"neotest": { "branch": "master", "commit": "32ff2ac21135a372a42b38ae131e531e64833bd3" },
|
"neotest": { "branch": "master", "commit": "32ff2ac21135a372a42b38ae131e531e64833bd3" },
|
||||||
@@ -43,19 +44,19 @@
|
|||||||
"neotest-rspec": { "branch": "main", "commit": "53fc108a06ae43d7f873d42ee5189c2301e33623" },
|
"neotest-rspec": { "branch": "main", "commit": "53fc108a06ae43d7f873d42ee5189c2301e33623" },
|
||||||
"nerdy.nvim": { "branch": "main", "commit": "b467d6609b78d6a5f1e12cbc08fcc1ac87af20f5" },
|
"nerdy.nvim": { "branch": "main", "commit": "b467d6609b78d6a5f1e12cbc08fcc1ac87af20f5" },
|
||||||
"noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" },
|
"noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" },
|
||||||
"none-ls.nvim": { "branch": "main", "commit": "3cc6c6ae11c89a6963f0b5a25ad2ce211039faf2" },
|
|
||||||
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
|
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
|
||||||
"numb.nvim": { "branch": "master", "commit": "3f7d4a74bd456e747a1278ea1672b26116e0824d" },
|
"numb.nvim": { "branch": "master", "commit": "3f7d4a74bd456e747a1278ea1672b26116e0824d" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "281a2e4cd1e7a17cea7ecb1745d84a8ab1249925" },
|
"nvim-dap": { "branch": "master", "commit": "281a2e4cd1e7a17cea7ecb1745d84a8ab1249925" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "a5606bc5958db86f8d92803bea7400ee26a8d7e4" },
|
"nvim-dap-ui": { "branch": "master", "commit": "a5606bc5958db86f8d92803bea7400ee26a8d7e4" },
|
||||||
|
"nvim-lint": { "branch": "master", "commit": "debabca63c0905b59ce596a55a8e33eafdf66342" },
|
||||||
"nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" },
|
"nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "911167921d49cd5c1c9b2436031d0da3945e787f" },
|
"nvim-lspconfig": { "branch": "master", "commit": "911167921d49cd5c1c9b2436031d0da3945e787f" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
||||||
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
|
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
|
||||||
"nvim-recorder": { "branch": "main", "commit": "ce96792c1ff750977fc3affc56f0561b0c20a7e2" },
|
"nvim-recorder": { "branch": "main", "commit": "ce96792c1ff750977fc3affc56f0561b0c20a7e2" },
|
||||||
"nvim-spectre": { "branch": "master", "commit": "ba7fb777edff6c1fbbeffd343e113af64c04e90a" },
|
"nvim-spectre": { "branch": "master", "commit": "ba7fb777edff6c1fbbeffd343e113af64c04e90a" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "e085c614fcd716eedb8e2e55bae2ccad4becd40d" },
|
"nvim-treesitter": { "branch": "master", "commit": "397982d197768ebdefc0e2db396d95c4d371ca86" },
|
||||||
"nvim-treesitter-context": { "branch": "master", "commit": "0f3332788e0bd37716fbd25f39120dcfd557c90f" },
|
"nvim-treesitter-context": { "branch": "master", "commit": "0f3332788e0bd37716fbd25f39120dcfd557c90f" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "41e3abf6bfd9a9a681eb1f788bdeba91c9004b2b" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "41e3abf6bfd9a9a681eb1f788bdeba91c9004b2b" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "0cb76eea80e9c73b88880f0ca78fbd04c5bdcac7" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "0cb76eea80e9c73b88880f0ca78fbd04c5bdcac7" },
|
||||||
@@ -82,6 +83,7 @@
|
|||||||
"vim-dadbod-completion": { "branch": "master", "commit": "880f7e9f2959e567c718d52550f9fae1aa07aa81" },
|
"vim-dadbod-completion": { "branch": "master", "commit": "880f7e9f2959e567c718d52550f9fae1aa07aa81" },
|
||||||
"vim-dadbod-ui": { "branch": "master", "commit": "2f344874918a3ab6bbe68fb866b3f003a639a5d2" },
|
"vim-dadbod-ui": { "branch": "master", "commit": "2f344874918a3ab6bbe68fb866b3f003a639a5d2" },
|
||||||
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" },
|
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" },
|
||||||
|
"vim-visual-multi": { "branch": "master", "commit": "38b0e8d94a5499ccc17d6159763d32c79f53417b" },
|
||||||
"vim-wakatime": { "branch": "master", "commit": "53bba6bb8342de9cbdafc82142a9b5e82008d858" },
|
"vim-wakatime": { "branch": "master", "commit": "53bba6bb8342de9cbdafc82142a9b5e82008d858" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "6c1584eb76b55629702716995cca4ae2798a9cca" },
|
"which-key.nvim": { "branch": "main", "commit": "6c1584eb76b55629702716995cca4ae2798a9cca" },
|
||||||
"yanky.nvim": { "branch": "main", "commit": "73215b77d22ebb179cef98e7e1235825431d10e4" },
|
"yanky.nvim": { "branch": "main", "commit": "73215b77d22ebb179cef98e7e1235825431d10e4" },
|
||||||
|
|||||||
+66
-13
@@ -14,6 +14,64 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"mg979/vim-visual-multi",
|
||||||
|
event = "BufReadPre",
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<C-S-Down>",
|
||||||
|
":call vm#commands#add_cursor_down(0, v:count1)<cr>",
|
||||||
|
desc = "Add Cursor Down",
|
||||||
|
mode = { "n" },
|
||||||
|
noremap = true,
|
||||||
|
silent = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<C-S-Up>",
|
||||||
|
":call vm#commands#add_cursor_up(0, v:count1)<cr>",
|
||||||
|
desc = "Add Cursor Up",
|
||||||
|
mode = { "n" },
|
||||||
|
noremap = true,
|
||||||
|
silent = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<M-S-j>",
|
||||||
|
":call vm#commands#add_cursor_down(0, v:count1)<cr>",
|
||||||
|
desc = "Add Cursor Down",
|
||||||
|
mode = { "n" },
|
||||||
|
noremap = true,
|
||||||
|
silent = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<M-S-k>",
|
||||||
|
":call vm#commands#add_cursor_up(0, v:count1)<cr>",
|
||||||
|
desc = "Add Cursor Down",
|
||||||
|
mode = { "n" },
|
||||||
|
noremap = true,
|
||||||
|
silent = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<M-d>",
|
||||||
|
":call vm#commands#ctrln(v:count1)<cr>",
|
||||||
|
desc = "Multi Edit Next",
|
||||||
|
mode = { "n" },
|
||||||
|
noremap = true,
|
||||||
|
silent = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
vim.g.VM_default_mappings = 0
|
||||||
|
vim.g.VM_silent_exit = 1
|
||||||
|
vim.g.VM_set_statusline = 0
|
||||||
|
vim.g.VM_maps = {
|
||||||
|
["Find Under"] = "",
|
||||||
|
}
|
||||||
|
|
||||||
|
vim.g.VM_maps["I BS"] = ""
|
||||||
|
vim.g.VM_maps["I CtrlC"] = ""
|
||||||
|
vim.g.VM_maps["I CtrlN"] = ""
|
||||||
|
end,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"CRAG666/code_runner.nvim",
|
"CRAG666/code_runner.nvim",
|
||||||
config = true,
|
config = true,
|
||||||
@@ -65,23 +123,18 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
event = { "InsertEnter" },
|
event = { "InsertEnter", "CmdlineEnter" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- autocomplete plugins
|
"hrsh7th/cmp-buffer", -- source for text in buffer
|
||||||
"hrsh7th/cmp-buffer",
|
"hrsh7th/cmp-path", -- source for file system paths
|
||||||
"hrsh7th/cmp-path",
|
|
||||||
"hrsh7th/cmp-cmdline",
|
"hrsh7th/cmp-cmdline",
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
"hrsh7th/cmp-nvim-lua",
|
"hrsh7th/cmp-nvim-lua",
|
||||||
"saadparwaiz1/cmp_luasnip",
|
"saadparwaiz1/cmp_luasnip", --for autocomplete
|
||||||
-- "hrsh7th/cmp-nvim-lsp-signature-help",
|
"hrsh7th/cmp-nvim-lsp-signature-help",
|
||||||
-- "hrsh7th/cmp-calc",
|
"onsails/lspkind.nvim", -- vs-code like pictograms
|
||||||
|
"L3MON4D3/LuaSnip", -- snippets
|
||||||
-- vscode like icons to autocomplete list
|
"rafamadriz/friendly-snippets", -- useful snippets
|
||||||
"onsails/lspkind.nvim",
|
|
||||||
-- snippet plugin
|
|
||||||
{ "L3MON4D3/LuaSnip", event = { "BufReadPost", "BufNewFile" } },
|
|
||||||
{ "rafamadriz/friendly-snippets", event = { "BufReadPost", "BufNewFile" } },
|
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("configs.cmp")
|
require("configs.cmp")
|
||||||
|
|||||||
@@ -0,0 +1,174 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'ThePrimeagen/refactoring.nvim',
|
||||||
|
config = function()
|
||||||
|
require('refactoring').setup()
|
||||||
|
-- vim.keymap.set("x", "<leader>re", ":Refactor extract ")
|
||||||
|
-- vim.keymap.set("x", "<leader>rf", ":Refactor extract_to_file ")
|
||||||
|
-- vim.keymap.set("x", "<leader>rv", ":Refactor extract_var ")
|
||||||
|
-- vim.keymap.set({ "n", "x" }, "<leader>ri", ":Refactor inline_var")
|
||||||
|
-- vim.keymap.set("n", "<leader>rI", ":Refactor inline_func")
|
||||||
|
-- vim.keymap.set("n", "<leader>rb", ":Refactor extract_block")
|
||||||
|
-- vim.keymap.set("n", "<leader>rbf", ":Refactor extract_block_to_file")
|
||||||
|
-- load refactoring Telescope extension
|
||||||
|
require('telescope').load_extension('refactoring')
|
||||||
|
|
||||||
|
vim.keymap.set({ 'n', 'x' }, '<leader>rr', function()
|
||||||
|
require('telescope').extensions.refactoring.refactors()
|
||||||
|
end, { desc = 'Refactor' })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'zapling/mason-lock.nvim',
|
||||||
|
cmd = { 'MasonLock', 'MasonLockRestore' },
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'2kabhishek/nerdy.nvim',
|
||||||
|
dependencies = { 'stevearc/dressing.nvim' },
|
||||||
|
cmd = 'Nerdy',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'folke/persistence.nvim',
|
||||||
|
event = 'BufReadPre',
|
||||||
|
opts = { options = vim.opt.sessionoptions:get() },
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
'<leader>ms',
|
||||||
|
function()
|
||||||
|
require('persistence').load()
|
||||||
|
end,
|
||||||
|
desc = 'Restore Session',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>ml',
|
||||||
|
function()
|
||||||
|
require('persistence').load({ last = true })
|
||||||
|
end,
|
||||||
|
desc = 'Restore Last Session',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>md',
|
||||||
|
function()
|
||||||
|
require('persistence').stop()
|
||||||
|
end,
|
||||||
|
desc = "Don't Save Current Session",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
lazy = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'iamcco/markdown-preview.nvim',
|
||||||
|
build = 'cd app && yarn install',
|
||||||
|
ft = { 'markdown' },
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
'<leader>cm',
|
||||||
|
'<cmd>MarkdownPreviewToggle<CR>',
|
||||||
|
desc = 'toggle markdown preview',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'nvim-pack/nvim-spectre',
|
||||||
|
build = false,
|
||||||
|
cmd = 'Spectre',
|
||||||
|
opts = { open_cmd = 'noswapfile vnew' },
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
'<leader>mr',
|
||||||
|
function()
|
||||||
|
require('spectre').open()
|
||||||
|
end,
|
||||||
|
desc = 'Replace in Files (Spectre)',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'szw/vim-maximizer',
|
||||||
|
|
||||||
|
keys = {
|
||||||
|
{ '<leader>mm', '<cmd>MaximizerToggle<CR>', desc = 'Maximize/minimize a split' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'folke/zen-mode.nvim',
|
||||||
|
cmd = { 'ZenMode' },
|
||||||
|
opts = {},
|
||||||
|
keys = {
|
||||||
|
{ '<leader>wz', '<cmd>ZenMode<cr>', desc = 'Toggle zen mode' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'creativenull/dotfyle-metadata.nvim',
|
||||||
|
cmd = { 'DotfyleGenerate', 'DotfyleOpen' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'willothy/flatten.nvim',
|
||||||
|
priority = 1001,
|
||||||
|
opts = {
|
||||||
|
window = {
|
||||||
|
open = 'alternate',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'wakatime/vim-wakatime',
|
||||||
|
event = { 'VimEnter' },
|
||||||
|
lazy = false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'mvllow/modes.nvim',
|
||||||
|
event = { 'BufReadPost', 'BufNewFile' },
|
||||||
|
tag = 'v0.2.0',
|
||||||
|
config = function()
|
||||||
|
require('modes').setup({
|
||||||
|
|
||||||
|
colors = {
|
||||||
|
visual = '#f5c359',
|
||||||
|
delete = '#c75c6a',
|
||||||
|
copy = '#78ccc5',
|
||||||
|
insert = '#c5739a',
|
||||||
|
},
|
||||||
|
line_opacity = 0.15,
|
||||||
|
set_cursor = true,
|
||||||
|
set_cursorline = true,
|
||||||
|
set_number = true,
|
||||||
|
ignore_filetypes = { 'NvimTree', 'TelescopePrompt' },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'LunarVim/bigfile.nvim',
|
||||||
|
event = { 'BufEnter', 'WinEnter' },
|
||||||
|
opts = {
|
||||||
|
-- Disables LSP/treesitter, etc for files above 5000 lives (even if they have really long lines)
|
||||||
|
pattern = function(bufnr, filesize_mib)
|
||||||
|
if filesize_mib >= 2 then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
-- you can't use `nvim_buf_line_count` because this runs on BufReadPre
|
||||||
|
local file_contents = vim.fn.readfile(vim.api.nvim_buf_get_name(bufnr))
|
||||||
|
local file_length = #file_contents
|
||||||
|
if file_length > 5000 then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'm4xshen/hardtime.nvim',
|
||||||
|
config = function()
|
||||||
|
require('hardtime').setup({ enabled = true })
|
||||||
|
end,
|
||||||
|
cmd = 'Hardtime',
|
||||||
|
init = function()
|
||||||
|
vim.keymap.set('n', '<leader>ch', '<cmd>HardtimeToggle<cr>', { desc = 'Toggle Hardtime' })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
+61
-57
@@ -1,63 +1,67 @@
|
|||||||
return {
|
return {
|
||||||
"stevearc/conform.nvim",
|
'stevearc/conform.nvim',
|
||||||
enabled = false,
|
enabled = true,
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { 'BufReadPre', 'BufNewFile' },
|
||||||
config = function()
|
config = function()
|
||||||
local conform = require("conform")
|
local conform = require('conform')
|
||||||
|
|
||||||
conform.setup({
|
conform.setup({
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
cpp = { "clang-format" },
|
cpp = { 'clang-format' },
|
||||||
c = { "clang-format" },
|
c = { 'clang-format' },
|
||||||
javascript = { "prettier" },
|
javascript = { 'prettier' },
|
||||||
typescript = { "prettier" },
|
typescript = { 'prettier' },
|
||||||
javascriptreact = { "prettier", "biome" },
|
javascriptreact = { 'prettier' },
|
||||||
typescriptreact = { "prettier" },
|
typescriptreact = { 'prettier' },
|
||||||
css = { "prettier" },
|
css = { 'prettier' },
|
||||||
html = { "prettier" },
|
html = { 'prettier' },
|
||||||
json = { "prettier" },
|
json = { 'prettier' },
|
||||||
markdown = { "markdownlint", "prettier" },
|
yaml = { 'prettier' },
|
||||||
lua = { "stylua" },
|
markdown = { 'prettier' },
|
||||||
python = { "isort", "black" },
|
lua = { 'stylua' },
|
||||||
php = { "php-cs-fixer" },
|
python = { 'isort', 'black' },
|
||||||
java = { "google-java-formatter", "trivy" },
|
php = { 'php-cs-fixer' },
|
||||||
graphql = { "prettier" },
|
java = { 'google-java-formatter' },
|
||||||
},
|
graphql = { 'prettier' },
|
||||||
format_on_save = function(bufnr)
|
liquid = { 'prettier' },
|
||||||
-- Disable with a global or buffer-local variable
|
bash = { 'shfmt' },
|
||||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
sh = { 'shfmt' },
|
||||||
return
|
},
|
||||||
end
|
format_on_save = function(bufnr)
|
||||||
return {
|
-- Disable with a global or buffer-local variable
|
||||||
lsp_fallback = true,
|
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||||
async = false,
|
return
|
||||||
timeout_ms = 500,
|
end
|
||||||
}
|
return {
|
||||||
end,
|
lsp_fallback = true,
|
||||||
})
|
async = false,
|
||||||
|
timeout_ms = 500,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>cf", function()
|
vim.keymap.set({ 'n', 'v' }, '<leader>cff', function()
|
||||||
conform.format({
|
conform.format({
|
||||||
lsp_fallback = true,
|
lsp_fallback = true,
|
||||||
async = true,
|
async = true,
|
||||||
timeout_ms = 1000,
|
timeout_ms = 1000,
|
||||||
})
|
})
|
||||||
end, { desc = "Format file or range (in visual mode)" })
|
end, { desc = 'Format file or range (in visual mode)' })
|
||||||
|
|
||||||
vim.keymap.set({ "n" }, "<leader>cfb", function()
|
vim.keymap.set({ 'n' }, '<leader>cfb', function()
|
||||||
vim.b.disable_autoformat = not vim.b.disable_autoformat
|
vim.b.disable_autoformat = not vim.b.disable_autoformat
|
||||||
vim.notify(
|
vim.notify(
|
||||||
"Buffer auto-format on-save: " .. (vim.b.disable_autoformat and "OFF" or "ON"),
|
'Buffer auto-format on-save: ' .. (vim.b.disable_autoformat and 'OFF' or 'ON'),
|
||||||
vim.log.levels.INFO
|
vim.log.levels.INFO
|
||||||
)
|
)
|
||||||
end, { desc = "Toggle auto-format on-save for buffer." })
|
end, { desc = 'Toggle auto-format on-save for buffer.' })
|
||||||
|
|
||||||
vim.keymap.set({ "n" }, "<leader>ftg", function()
|
vim.keymap.set({ 'n' }, '<leader>cft', function()
|
||||||
vim.g.disable_autoformat = not vim.g.disable_autoformat
|
vim.g.disable_autoformat = not vim.g.disable_autoformat
|
||||||
vim.notify(
|
vim.notify(
|
||||||
"Global auto-format on-save: " .. (vim.g.disable_autoformat and "OFF" or "ON"),
|
'Global auto-format on-save: ' .. (vim.g.disable_autoformat and 'OFF' or 'ON'),
|
||||||
vim.log.levels.INFO
|
vim.log.levels.INFO
|
||||||
)
|
)
|
||||||
end, { desc = "Toggle auto-format on-save globally." })
|
end, { desc = 'Toggle auto-format on-save globally.' })
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
+32
-25
@@ -1,27 +1,34 @@
|
|||||||
return {
|
return {
|
||||||
"mfussenegger/nvim-lint",
|
'mfussenegger/nvim-lint',
|
||||||
enabled = false,
|
event = { 'BufReadPre', 'BufNewFile' },
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
opts = {
|
||||||
opts = {
|
linters_by_ft = {
|
||||||
linters_by_ft = {
|
lua = { 'selene' },
|
||||||
lua = { "selene" },
|
cpp = { 'cpplint' },
|
||||||
cpp = { "cpplint" },
|
c = { 'cpplint' },
|
||||||
c = { "cpplint" },
|
javascript = { 'eslint_d' },
|
||||||
javascript = { "eslint_d" },
|
typescript = { 'eslint_d' },
|
||||||
typescript = { "eslint_d" },
|
javascriptreact = { 'eslint_d' },
|
||||||
javascriptreact = { "eslint_d" },
|
typescriptreact = { 'eslint_d' },
|
||||||
typescriptreact = { "eslint_d" },
|
python = { 'ruff', 'mypy' },
|
||||||
python = { "pylint" },
|
markdown = { 'markdownlint' },
|
||||||
markdown = { "markdownlint" },
|
java = { 'trivy' },
|
||||||
java = { "trivy" },
|
php = { 'phpcs' },
|
||||||
php = { "phpcs" },
|
},
|
||||||
},
|
},
|
||||||
},
|
config = function()
|
||||||
config = function()
|
local lint = require('lint')
|
||||||
local lint = require("lint")
|
local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true })
|
||||||
-- TODO create auto command ran after Buffer Wrote
|
|
||||||
vim.keymap.set("n", "<leader>cl", function()
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
|
||||||
lint.try_lint()
|
group = lint_augroup,
|
||||||
end, { desc = "Trigger linting for current file" })
|
callback = function()
|
||||||
end,
|
lint.try_lint()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>cl', function()
|
||||||
|
lint.try_lint()
|
||||||
|
end, { desc = 'Trigger linting for current file' })
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"williamboman/mason.nvim",
|
|
||||||
cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUpdate" },
|
|
||||||
dependencies = {
|
|
||||||
{ "williamboman/mason-lspconfig.nvim", event = { "BufReadPre", "BufNewFile" } },
|
|
||||||
{ "WhoIsSethDaniel/mason-tool-installer.nvim" },
|
|
||||||
{ "zapling/mason-lock.nvim", cmd = { "MasonLock", "MasonLockRestore" }, opts = {} },
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("mason").setup()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvimtools/none-ls.nvim", -- configure formatters & linters
|
|
||||||
event = { "BufRead", "FileType" },
|
|
||||||
dependencies = {
|
|
||||||
"jay-babu/mason-null-ls.nvim",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("configs.none-ls")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -10,4 +10,25 @@ return {
|
|||||||
require('configs.lsp')
|
require('configs.lsp')
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'williamboman/mason.nvim',
|
||||||
|
cmd = { 'Mason', 'MasonInstall', 'MasonInstallAll', 'MasonUpdate' },
|
||||||
|
dependencies = {
|
||||||
|
'williamboman/mason-lspconfig.nvim',
|
||||||
|
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require('mason').setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
-- {
|
||||||
|
-- "nvimtools/none-ls.nvim", -- configure formatters & linters
|
||||||
|
-- event = { "BufRead", "FileType" },
|
||||||
|
-- dependencies = {
|
||||||
|
-- "jay-babu/mason-null-ls.nvim",
|
||||||
|
-- },
|
||||||
|
-- config = function()
|
||||||
|
-- require("configs.none-ls")
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
}
|
}
|
||||||
@@ -1,199 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"ThePrimeagen/refactoring.nvim",
|
|
||||||
config = function()
|
|
||||||
require("refactoring").setup()
|
|
||||||
-- vim.keymap.set("x", "<leader>re", ":Refactor extract ")
|
|
||||||
-- vim.keymap.set("x", "<leader>rf", ":Refactor extract_to_file ")
|
|
||||||
--
|
|
||||||
-- vim.keymap.set("x", "<leader>rv", ":Refactor extract_var ")
|
|
||||||
--
|
|
||||||
-- vim.keymap.set({ "n", "x" }, "<leader>ri", ":Refactor inline_var")
|
|
||||||
--
|
|
||||||
-- vim.keymap.set("n", "<leader>rI", ":Refactor inline_func")
|
|
||||||
--
|
|
||||||
-- vim.keymap.set("n", "<leader>rb", ":Refactor extract_block")
|
|
||||||
-- vim.keymap.set("n", "<leader>rbf", ":Refactor extract_block_to_file")
|
|
||||||
-- load refactoring Telescope extension
|
|
||||||
require("telescope").load_extension("refactoring")
|
|
||||||
|
|
||||||
vim.keymap.set({ "n", "x" }, "<leader>rr", function()
|
|
||||||
require("telescope").extensions.refactoring.refactors()
|
|
||||||
end, { desc = "Refactor" })
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"2kabhishek/nerdy.nvim",
|
|
||||||
dependencies = { "stevearc/dressing.nvim" },
|
|
||||||
cmd = "Nerdy",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/persistence.nvim",
|
|
||||||
event = "BufReadPre",
|
|
||||||
opts = { options = vim.opt.sessionoptions:get() },
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>ms",
|
|
||||||
function()
|
|
||||||
require("persistence").load()
|
|
||||||
end,
|
|
||||||
desc = "Restore Session",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>ml",
|
|
||||||
function()
|
|
||||||
require("persistence").load({ last = true })
|
|
||||||
end,
|
|
||||||
desc = "Restore Last Session",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>md",
|
|
||||||
function()
|
|
||||||
require("persistence").stop()
|
|
||||||
end,
|
|
||||||
desc = "Don't Save Current Session",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
lazy = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"iamcco/markdown-preview.nvim",
|
|
||||||
build = "cd app && yarn install",
|
|
||||||
ft = { "markdown" },
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>cm",
|
|
||||||
"<cmd>MarkdownPreviewToggle<CR>",
|
|
||||||
desc = "toggle markdown preview",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-pack/nvim-spectre",
|
|
||||||
build = false,
|
|
||||||
cmd = "Spectre",
|
|
||||||
opts = { open_cmd = "noswapfile vnew" },
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>mr",
|
|
||||||
function()
|
|
||||||
require("spectre").open()
|
|
||||||
end,
|
|
||||||
desc = "Replace in Files (Spectre)",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"szw/vim-maximizer",
|
|
||||||
|
|
||||||
keys = {
|
|
||||||
{ "<leader>mm", "<cmd>MaximizerToggle<CR>", desc = "Maximize/minimize a split" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/zen-mode.nvim",
|
|
||||||
cmd = { "ZenMode" },
|
|
||||||
opts = {},
|
|
||||||
keys = {
|
|
||||||
{ "<leader>wz", "<cmd>ZenMode<cr>", desc = "Toggle zen mode" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"chrisgrieser/nvim-recorder",
|
|
||||||
dependencies = { "rcarriga/nvim-notify" },
|
|
||||||
event = "VeryLazy",
|
|
||||||
vscode = true,
|
|
||||||
keys = {
|
|
||||||
{ "q", desc = "Start Recording" },
|
|
||||||
{ "Q", desc = "Play Recording" },
|
|
||||||
{ "<C-q>", desc = "Switch Slot" },
|
|
||||||
{ "cq", desc = "Edit Macro" },
|
|
||||||
{ "yq", desc = "Yank Macro" },
|
|
||||||
{ "dq", desc = "Delete All Macros" },
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
useNerdFontsIcons = false,
|
|
||||||
slots = { "a", "b", "c", "d" },
|
|
||||||
mapping = {
|
|
||||||
startStopRecording = "q",
|
|
||||||
playMacro = "Q",
|
|
||||||
editMacro = "cq",
|
|
||||||
switchSlot = "<C-q>",
|
|
||||||
deleteAllMacros = "dq",
|
|
||||||
yankMacro = "yq",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"creativenull/dotfyle-metadata.nvim",
|
|
||||||
cmd = { "DotfyleGenerate", "DotfyleOpen" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"willothy/flatten.nvim",
|
|
||||||
priority = 1001,
|
|
||||||
opts = {
|
|
||||||
window = {
|
|
||||||
open = "alternate",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"wakatime/vim-wakatime",
|
|
||||||
event = { "VimEnter" },
|
|
||||||
lazy = false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"mvllow/modes.nvim",
|
|
||||||
event = { "BufReadPost", "BufNewFile" },
|
|
||||||
tag = "v0.2.0",
|
|
||||||
config = function()
|
|
||||||
require("modes").setup({
|
|
||||||
|
|
||||||
colors = {
|
|
||||||
visual = "#f5c359",
|
|
||||||
delete = "#c75c6a",
|
|
||||||
copy = "#78ccc5",
|
|
||||||
insert = "#c5739a",
|
|
||||||
},
|
|
||||||
line_opacity = 0.15,
|
|
||||||
set_cursor = true,
|
|
||||||
set_cursorline = true,
|
|
||||||
set_number = true,
|
|
||||||
ignore_filetypes = { "NvimTree", "TelescopePrompt" },
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"LunarVim/bigfile.nvim",
|
|
||||||
event = { "BufEnter", "WinEnter" },
|
|
||||||
opts = {
|
|
||||||
-- Disables LSP/treesitter, etc for files above 5000 lives (even if they have really long lines)
|
|
||||||
pattern = function(bufnr, filesize_mib)
|
|
||||||
if filesize_mib >= 2 then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
-- you can't use `nvim_buf_line_count` because this runs on BufReadPre
|
|
||||||
local file_contents = vim.fn.readfile(vim.api.nvim_buf_get_name(bufnr))
|
|
||||||
local file_length = #file_contents
|
|
||||||
if file_length > 5000 then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
return false
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"m4xshen/hardtime.nvim",
|
|
||||||
config = function()
|
|
||||||
require("hardtime").setup({ enabled = true })
|
|
||||||
end,
|
|
||||||
cmd = "Hardtime",
|
|
||||||
init = function()
|
|
||||||
vim.keymap.set("n", "<leader>ch", "<cmd>HardtimeToggle<cr>", { desc = "Toggle Hardtime" })
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -37,6 +37,7 @@ return {
|
|||||||
'scss',
|
'scss',
|
||||||
'lua',
|
'lua',
|
||||||
'python',
|
'python',
|
||||||
|
'liquid',
|
||||||
},
|
},
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
playground = {
|
playground = {
|
||||||
@@ -74,7 +75,7 @@ return {
|
|||||||
{
|
{
|
||||||
'nvim-treesitter/nvim-treesitter-context',
|
'nvim-treesitter/nvim-treesitter-context',
|
||||||
event = 'VeryLazy',
|
event = 'VeryLazy',
|
||||||
config = function(_, opts)
|
config = function()
|
||||||
require('treesitter-context').setup({ mode = 'cursor', max_lines = 3 })
|
require('treesitter-context').setup({ mode = 'cursor', max_lines = 3 })
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|||||||
+2
-1
@@ -10,6 +10,7 @@
|
|||||||
"eslint-lsp": "4.10.0",
|
"eslint-lsp": "4.10.0",
|
||||||
"eslint_d": "14.0.3",
|
"eslint_d": "14.0.3",
|
||||||
"google-java-format": "v1.23.0",
|
"google-java-format": "v1.23.0",
|
||||||
|
"graphql-language-service-cli": "3.5.0",
|
||||||
"hadolint": "v2.12.0",
|
"hadolint": "v2.12.0",
|
||||||
"html-lsp": "4.10.0",
|
"html-lsp": "4.10.0",
|
||||||
"isort": "5.13.2",
|
"isort": "5.13.2",
|
||||||
@@ -21,7 +22,7 @@
|
|||||||
"prettierd": "0.25.3",
|
"prettierd": "0.25.3",
|
||||||
"pylint": "3.2.6",
|
"pylint": "3.2.6",
|
||||||
"pyright": "1.1.377",
|
"pyright": "1.1.377",
|
||||||
"python-lsp-server": "1.11.0",
|
"python-lsp-server": "1.12.0",
|
||||||
"selene": "0.27.1",
|
"selene": "0.27.1",
|
||||||
"shfmt": "v3.9.0",
|
"shfmt": "v3.9.0",
|
||||||
"stylua": "v0.20.0",
|
"stylua": "v0.20.0",
|
||||||
|
|||||||
Reference in new issue
Block a user