Added Formatters
This commit is contained in:
@@ -1,41 +1,46 @@
|
|||||||
{
|
{
|
||||||
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
|
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||||
"colorful-winsep.nvim": { "branch": "alpha", "commit": "0070484536ea55ec64a8453d41e3badace04a61a" },
|
"colorful-winsep.nvim": { "branch": "alpha", "commit": "0070484536ea55ec64a8453d41e3badace04a61a" },
|
||||||
"emoji.nvim": { "branch": "main", "commit": "5c68359b56d2470583832b6b2b559566c5b39dc8" },
|
"emoji.nvim": { "branch": "main", "commit": "5c68359b56d2470583832b6b2b559566c5b39dc8" },
|
||||||
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
||||||
"fzf-lua": { "branch": "main", "commit": "9b84b53f3297d4912d7eb95b979e9b27e2e61281" },
|
"fzf-lua": { "branch": "main", "commit": "6488ada2f376e47789391dc353b6d91a3f9de6f6" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "3c76f7fabac723aa682365ef782f88a83ccdb4ac" },
|
||||||
"harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" },
|
"harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "e5e9bf48211a13d9ee6c1077c88327c49c1ab4a0" },
|
"jest.nvim": { "branch": "master", "commit": "1ec13b863512f3673116986e6d27dc49bc17b829" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
|
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "f4f791f67e70d378a754d02da068231d2352e5bc" },
|
"lualine.nvim": { "branch": "master", "commit": "1517caa8fff05e4b4999857319d3b0609a7f57fa" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
||||||
|
"mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
||||||
"mini.comment": { "branch": "main", "commit": "264b8a63edd5a9a41d5361a1d52c13131c3c51a2" },
|
"mini.comment": { "branch": "main", "commit": "fb867a9246f9b892cf51a8c84a3f8479cdf1558c" },
|
||||||
"mini.indentscope": { "branch": "main", "commit": "8ce41a77eed7f4121c83c67fda5e2e86af999e6d" },
|
"mini.indentscope": { "branch": "main", "commit": "8af2569a7d7fd37300dfa760e44e71efbbf322fd" },
|
||||||
"mini.move": { "branch": "main", "commit": "c8b30e92dd2668dd6e56a9a23cb7d4ee38c2266d" },
|
"mini.move": { "branch": "main", "commit": "4fe4a855fee53c66b0f3255a4b54ddc2ae6b308c" },
|
||||||
"mini.pairs": { "branch": "main", "commit": "1a3e73649c0eaef2f6c48ce1e761c6f0a7c11918" },
|
"mini.pairs": { "branch": "main", "commit": "69864a2efb36c030877421634487fd90db1e4298" },
|
||||||
"mini.surround": { "branch": "main", "commit": "f90069c7441a5fb04c3de42eacf93e16b64dd3eb" },
|
"mini.surround": { "branch": "main", "commit": "5aab42fcdcf31fa010f012771eda5631c077840a" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "68f0e5c3dab23261a945272032ee6700af86227a" },
|
"none-ls.nvim": { "branch": "main", "commit": "a117163db44c256d53c3be8717f3e1a2a28e6299" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "12509903a5723a876abd65953109f926f4634c30" },
|
"nvim-autopairs": { "branch": "master", "commit": "84a81a7d1f28b381b32acf1e8fe5ff5bef4f7968" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "6b63bdf2399b9bedf93297d98419550523a9ad68" },
|
"nvim-cmp": { "branch": "main", "commit": "059e89495b3ec09395262f16b1ad441a38081d04" },
|
||||||
"nvim-svelte-snippets": { "branch": "main", "commit": "0b8ceaebd528e52656303ddf66c584e9b67a52ba" },
|
"nvim-lspconfig": { "branch": "master", "commit": "40f120c10ea4b87311175539a183c3b75eab95a3" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "6709463b2d18e77f7a946027917aa00d4aaed6f4" },
|
"nvim-svelte-snippets": { "branch": "main", "commit": "1afae9e05c8488d4cc956c0ddaf127844816ce5f" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "5774e7d3da4f681296a87fcd85d17779ad362a4f" },
|
"nvim-tree.lua": { "branch": "master", "commit": "44d9b58f11d5a426c297aafd0be1c9d45617a849" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" },
|
"nvim-treesitter": { "branch": "master", "commit": "30654ee72a69e7c76a54b66d748dae088429e863" },
|
||||||
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "9937e5e356e5b227ec56d83d0a9d0a0f6bc9cad4" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
|
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "1020869742ecb191f260818234517f4a1515cfe8" },
|
"nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" },
|
||||||
"plenary": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
"plenary": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
"telescope-file-browser.nvim": { "branch": "master", "commit": "626998e5c1b71c130d8bc6cf7abb6709b98287bb" },
|
"telescope-file-browser.nvim": { "branch": "master", "commit": "626998e5c1b71c130d8bc6cf7abb6709b98287bb" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "78857db9e8d819d3cc1a9a7bdc1d39d127a36495" },
|
"telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" },
|
||||||
"vim-prettier": { "branch": "master", "commit": "7dbdbb12c50a9f4ba72390cce2846248e4368fd0" },
|
"vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" },
|
||||||
"vscode": { "branch": "main", "commit": "298c5ce4750a256ea208b72d7a472b8824ef2a49" },
|
"vscode": { "branch": "main", "commit": "49d6014ba151fc6cc585b8d5f057ca7839077bf8" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" },
|
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" },
|
||||||
"winbar.nvim": { "branch": "main", "commit": "13739fdb31be51a1000486189662596f07a59a31" }
|
"winbar.nvim": { "branch": "main", "commit": "13739fdb31be51a1000486189662596f07a59a31" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,55 +4,62 @@ require("stevenmm.remap")
|
|||||||
require("stevenmm.lazy_init")
|
require("stevenmm.lazy_init")
|
||||||
|
|
||||||
local augroup = vim.api.nvim_create_augroup
|
local augroup = vim.api.nvim_create_augroup
|
||||||
local StevenmmGroup = augroup('Stevenmm', {})
|
local StevenmmGroup = augroup("Stevenmm", {})
|
||||||
|
|
||||||
local autocmd = vim.api.nvim_create_autocmd
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
local yank_group = augroup('HighlightYank', {})
|
local yank_group = augroup("HighlightYank", {})
|
||||||
|
|
||||||
function R(name)
|
function R(name)
|
||||||
require("plenary.reload").reload_module(name)
|
require("plenary.reload").reload_module(name)
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.filetype.add({
|
vim.filetype.add({
|
||||||
extension = {
|
extension = {
|
||||||
templ = 'templ',
|
templ = "templ",
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
autocmd('TextYankPost', {
|
autocmd("TextYankPost", {
|
||||||
group = yank_group,
|
group = yank_group,
|
||||||
pattern = '*',
|
pattern = "*",
|
||||||
callback = function ()
|
callback = function()
|
||||||
vim.highlight.on_yank({
|
vim.highlight.on_yank({
|
||||||
higroup = 'IncSearch',
|
higroup = "IncSearch",
|
||||||
timeout = 40,
|
timeout = 40,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
autocmd({"BufWritePre"}, {
|
autocmd({ "BufWritePre" }, {
|
||||||
group = StevenmmGroup,
|
group = StevenmmGroup,
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
command = [[%s/\s\+$//e]],
|
command = [[%s/\s\+$//e]],
|
||||||
})
|
})
|
||||||
|
|
||||||
autocmd('LspAttach', {
|
autocmd("LspAttach", {
|
||||||
group = StevenmmGroup,
|
group = StevenmmGroup,
|
||||||
callback = function (e)
|
callback = function(e)
|
||||||
local opts = { buffer = e.buf }
|
local opts = { buffer = e.buf }
|
||||||
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
-- vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
||||||
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
|
vim.keymap.set("n", "gd", ":lua vim.lsp.buf.definition()<CR>", opts)
|
||||||
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
|
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
|
||||||
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
|
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
|
||||||
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
|
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
|
||||||
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.reference() end, opts)
|
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
|
||||||
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
|
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
|
||||||
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
|
||||||
vim.keymap.set("n", "[d", function() vim.lsp.buf.goto_next() end, opts)
|
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
||||||
vim.keymap.set("n", "]d", function() vim.lsp.buf.goto_prev() end, opts)
|
vim.keymap.set("n", "[d", function() vim.lsp.buf.goto_next() end, opts)
|
||||||
end
|
vim.keymap.set("n", "]d", function() vim.lsp.buf.goto_prev() end, opts)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.g.netrw_browse_split = 0
|
vim.g.netrw_browse_split = 0
|
||||||
vim.g.netrw_banner = 0
|
vim.g.netrw_banner = 0
|
||||||
vim.g.netrw_winsize = 25
|
vim.g.netrw_winsize = 25
|
||||||
|
vim.g.have_nerd_font = true
|
||||||
|
vim.g.lazydev_enabled = true
|
||||||
|
|
||||||
|
vim.g.jest_command = "npx jest"
|
||||||
|
vim.g.jest_options = "--silent --coverage --no-cache"
|
||||||
|
vim.g.jest_run_watch = 1
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
return {
|
return {}
|
||||||
|
|
||||||
}
|
|
||||||
-- return {
|
-- return {
|
||||||
-- "adalessa/laravel.nvim",
|
-- "adalessa/laravel.nvim",
|
||||||
-- dependencies = {
|
-- dependencies = {
|
||||||
|
|||||||
@@ -1,92 +1,105 @@
|
|||||||
return {
|
return {
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
|
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
"hrsh7th/cmp-buffer",
|
"hrsh7th/cmp-buffer",
|
||||||
"hrsh7th/cmp-path",
|
"hrsh7th/cmp-path",
|
||||||
"hrsh7th/cmp-cmdline",
|
"hrsh7th/cmp-cmdline",
|
||||||
|
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
"saadparwaiz1/cmp_luasnip",
|
"saadparwaiz1/cmp_luasnip",
|
||||||
"onsails/lspkind.nvim",
|
"onsails/lspkind.nvim",
|
||||||
},
|
},
|
||||||
|
|
||||||
config = function ()
|
-- opts = function(_, opts)
|
||||||
print("cmp.lua")
|
-- opts.sources = vim.tbl_filter(function(source)
|
||||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
-- return not vim.tbl_contains({ "buffer", "nvim_lsp" }, source.name)
|
||||||
local cmp = require('cmp')
|
-- end, opts.sources)
|
||||||
local cmp_select = { behavior = cmp.SelectBehavior.Select }
|
-- table.insert(opts.sources, 1, {
|
||||||
local lspkind = require("lspkind")
|
-- name = "nvim_lsp",
|
||||||
|
-- entry_filter = function(entry, _)
|
||||||
|
-- return require("cmp.types").lsp.CompletionItemKind[entry:get_kind()] ~= "Text"
|
||||||
|
-- end,
|
||||||
|
-- })
|
||||||
|
-- end,
|
||||||
|
|
||||||
cmp.event:on(
|
config = function()
|
||||||
'confirm_done',
|
-- print("cmp.lua")
|
||||||
cmp_autopairs.on_confirm_done()
|
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||||
)
|
local cmp = require("cmp")
|
||||||
|
local cmp_select = { behavior = cmp.SelectBehavior.Select }
|
||||||
|
local lspkind = require("lspkind")
|
||||||
|
|
||||||
cmp.setup({
|
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||||
enabled = function()
|
|
||||||
-- disable completion in comments
|
|
||||||
local context = require('cmp.config.context')
|
|
||||||
-- keep command mode completion enabled when cursor is in a comment
|
|
||||||
if vim.api.nvim_get_mode().mode == 'c' then
|
|
||||||
return true
|
|
||||||
else
|
|
||||||
return not context.in_treesitter_capture("comment") and not context.in_syntax_group("Comment")
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
|
|
||||||
formatting = {
|
cmp.setup({
|
||||||
format = lspkind.cmp_format({
|
enabled = function()
|
||||||
mode = 'symbol_text',
|
-- disable completion in comments
|
||||||
max_width = {
|
local context = require("cmp.config.context")
|
||||||
menu = 50,
|
-- keep command mode completion enabled when cursor is in a comment
|
||||||
abbr = 50,
|
if vim.api.nvim_get_mode().mode == "c" then
|
||||||
},
|
return true
|
||||||
show_labelDetails = true
|
else
|
||||||
}),
|
return not context.in_treesitter_capture("comment") and not context.in_syntax_group("Comment")
|
||||||
},
|
end
|
||||||
|
end,
|
||||||
|
|
||||||
-- preselect = { cmp.PreselectMode.Item },
|
formatting = {
|
||||||
performance = {
|
format = lspkind.cmp_format({
|
||||||
max_view_entries = 10,
|
mode = "symbol_text",
|
||||||
},
|
max_width = {
|
||||||
snippet = {
|
menu = 50,
|
||||||
expand = function(args)
|
abbr = 50,
|
||||||
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
},
|
||||||
-- require('nvim-svelte-snippets').
|
show_labelDetails = true,
|
||||||
end,
|
}),
|
||||||
},
|
},
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
['<Down>'] = cmp.mapping.select_next_item(cmp_select),
|
|
||||||
['<Up>'] = cmp.mapping.select_prev_item(cmp_select),
|
|
||||||
['<C-j>'] = cmp.mapping.select_next_item(cmp_select),
|
|
||||||
['<C-k>'] = cmp.mapping.select_prev_item(cmp_select),
|
|
||||||
['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }),
|
|
||||||
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }),
|
|
||||||
['<C-Space>'] = cmp.mapping.complete({
|
|
||||||
config = {
|
|
||||||
sources = {
|
|
||||||
{ name = 'luasnip' }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
['<C-e>'] = cmp.mapping({
|
|
||||||
i = cmp.mapping.abort(),
|
|
||||||
c = cmp.mapping.close(),
|
|
||||||
}),
|
|
||||||
--['<C-y>'] = cmp.mapping.confirm({ select = true }),
|
|
||||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
|
||||||
}),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = 'nvim_lsp' },
|
|
||||||
{ name = 'luasnip' },
|
|
||||||
}, {
|
|
||||||
{ name = 'buffer' },
|
|
||||||
}),
|
|
||||||
|
|
||||||
})
|
-- preselect = { cmp.PreselectMode.Item },
|
||||||
end
|
performance = {
|
||||||
|
max_view_entries = 10,
|
||||||
|
},
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
require("luasnip").lsp_expand(args.body) -- For `luasnip` users.
|
||||||
|
-- require('nvim-svelte-snippets').
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
["<Down>"] = cmp.mapping.select_next_item(cmp_select),
|
||||||
|
["<Up>"] = cmp.mapping.select_prev_item(cmp_select),
|
||||||
|
["<C-j>"] = cmp.mapping.select_next_item(cmp_select),
|
||||||
|
["<C-k>"] = cmp.mapping.select_prev_item(cmp_select),
|
||||||
|
["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs(-4), { "i", "c" }),
|
||||||
|
["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(4), { "i", "c" }),
|
||||||
|
-- ['<C-Space>'] = function ()
|
||||||
|
-- vim.lsp.completion.get()
|
||||||
|
-- end,sV
|
||||||
|
-- cmp.mapping.complete(),
|
||||||
|
-- {
|
||||||
|
-- config = {
|
||||||
|
-- sources = {
|
||||||
|
-- { name = 'luasnip' }
|
||||||
|
-- }
|
||||||
|
-- }
|
||||||
|
-- }),
|
||||||
|
["<C-e>"] = cmp.mapping({
|
||||||
|
i = cmp.mapping.abort(),
|
||||||
|
c = cmp.mapping.close(),
|
||||||
|
}),
|
||||||
|
--['<C-y>'] = cmp.mapping.confirm({ select = true }),
|
||||||
|
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||||
|
}),
|
||||||
|
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "luasnip" },
|
||||||
|
}, {
|
||||||
|
{ name = "buffer" },
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
require("stevenmm.variables")
|
require("stevenmm.variables")
|
||||||
return {
|
return {
|
||||||
'nvim-zh/colorful-winsep.nvim',
|
"nvim-zh/colorful-winsep.nvim",
|
||||||
config = function ()
|
config = function()
|
||||||
local winsep = require("colorful-winsep")
|
local winsep = require("colorful-winsep")
|
||||||
local bg = require("vscode.colors").get_colors().vscBack
|
local bg = require("vscode.colors").get_colors().vscBack
|
||||||
winsep.setup({
|
winsep.setup({
|
||||||
highlight = {
|
highlight = {
|
||||||
fg = "#A066E8",
|
fg = "#A066E8",
|
||||||
bg = bg,
|
bg = bg,
|
||||||
},
|
},
|
||||||
no_exec_files = EXCLUDED_FILETYPES_ARRAY,
|
no_exec_files = EXCLUDED_FILETYPES_ARRAY,
|
||||||
symbols = { "─", "│", "╭", "╮", "╰", "╯" },
|
symbols = { "─", "│", "╭", "╮", "╰", "╯" },
|
||||||
})
|
})
|
||||||
end
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,36 +1,36 @@
|
|||||||
function ColorMyPencils(color)
|
function ColorMyPencils(color)
|
||||||
-- color = color or "rose-pine-moon"
|
-- color = color or "rose-pine-moon"
|
||||||
color = color or "vscode"
|
color = color or "vscode"
|
||||||
vim.cmd.colorscheme(color)
|
vim.cmd.colorscheme(color)
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, "Normal", {bg = "none" })
|
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
-- "rose-pine/neovim",
|
-- "rose-pine/neovim",
|
||||||
"Mofiqul/vscode.nvim",
|
"Mofiqul/vscode.nvim",
|
||||||
-- name = "rose-pine",
|
-- name = "rose-pine",
|
||||||
name = "vscode",
|
name = "vscode",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
prority = 1000,
|
prority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
-- require("rose-pine").setup({
|
-- require("rose-pine").setup({
|
||||||
require("vscode").setup({
|
require("vscode").setup({
|
||||||
transparent = true,
|
transparent = true,
|
||||||
italic_comments = true,
|
italic_comments = true,
|
||||||
-- styles = {
|
-- styles = {
|
||||||
-- bold = false,
|
-- bold = false,
|
||||||
-- italic = false,
|
-- italic = false,
|
||||||
-- transparency = true,
|
-- transparency = true,
|
||||||
-- },
|
-- },
|
||||||
-- disable_background = true,
|
-- disable_background = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.cmd("colorscheme vscode")
|
vim.cmd("colorscheme vscode")
|
||||||
|
|
||||||
ColorMyPencils()
|
ColorMyPencils()
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
return {
|
return {
|
||||||
'JoosepAlviste/nvim-ts-context-commentstring',
|
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||||
config = function ()
|
config = function()
|
||||||
require('ts_context_commentstring').setup({
|
require("ts_context_commentstring").setup({
|
||||||
enable_autocmd = false,
|
enable_autocmd = false,
|
||||||
})
|
})
|
||||||
end
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
"allaman/emoji.nvim",
|
"allaman/emoji.nvim",
|
||||||
version = "1.0.0", -- optionally pin to a tag
|
version = "1.0.0", -- optionally pin to a tag
|
||||||
ft = "markdown", -- adjust to your needs
|
ft = "markdown", -- adjust to your needs
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- util for handling paths
|
-- util for handling paths
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
|
|||||||
42
lua/stevenmm/lazy/formatting.lua
Normal file
42
lua/stevenmm/lazy/formatting.lua
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
return {
|
||||||
|
"nvimtools/none-ls.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local null_ls = require("null-ls")
|
||||||
|
|
||||||
|
null_ls.setup({
|
||||||
|
sources = {
|
||||||
|
null_ls.builtins.formatting.prettierd.with({
|
||||||
|
filetypes = {
|
||||||
|
"javascript",
|
||||||
|
"javascriptreact",
|
||||||
|
"typescript",
|
||||||
|
"typescriptreact",
|
||||||
|
"css",
|
||||||
|
"html",
|
||||||
|
"json",
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
|
||||||
|
null_ls.builtins.formatting.stylua.with({
|
||||||
|
syntax = "All",
|
||||||
|
indent_type = "Tabs",
|
||||||
|
indent_width = 4,
|
||||||
|
quote_style = "AutoPreferDouble",
|
||||||
|
space_after_function_names = "Always",
|
||||||
|
collapse_simple_statement = "FunctionOnly",
|
||||||
|
}),
|
||||||
|
|
||||||
|
-- require("none-ls.diagnostics.eslint"),
|
||||||
|
},
|
||||||
|
on_attach = function(client, bufnr)
|
||||||
|
if client.supports_method("textDocument/formatting") then
|
||||||
|
-- vim.api.nvim_buf_set_option(bufnr, "formatexpr", "v:lua.vim.lsp.formatexpr()")
|
||||||
|
vim.api.nvim_set_option_value("formatexpr", "v:lua.vim.lsp.formatexpr()", { buf = bufnr })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
13
lua/stevenmm/lazy/git-integrations.lua
Normal file
13
lua/stevenmm/lazy/git-integrations.lua
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"tpope/vim-fugitive",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
config = function()
|
||||||
|
require("gitsigns").setup()
|
||||||
|
|
||||||
|
-- vim.keymap
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,20 +1,39 @@
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
"ThePrimeagen/harpoon",
|
"ThePrimeagen/harpoon",
|
||||||
branch = "harpoon2",
|
branch = "harpoon2",
|
||||||
-- dependencies = {
|
dependencies = {
|
||||||
-- "nvim-lua/plenary.nvim"
|
"nvim-lua/plenary.nvim",
|
||||||
-- },
|
},
|
||||||
|
|
||||||
global_settings = {
|
-- global_settings = {
|
||||||
|
--
|
||||||
|
-- },
|
||||||
|
|
||||||
},
|
config = function()
|
||||||
|
local harpoon = require("harpoon")
|
||||||
|
|
||||||
-- config = function ()
|
harpoon:setup()
|
||||||
-- local harpoon = require('harpoon')
|
|
||||||
-- harpoon:setup({})
|
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end)
|
||||||
--
|
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||||
-- -- vim.keymap.set("n", "<leader>a", function () harpoon:list():add() end)
|
|
||||||
--
|
vim.keymap.set("n", "<C-h>", function() harpoon:list():select(1) end)
|
||||||
-- end
|
vim.keymap.set("n", "<C-t>", function() harpoon:list():select(2) end)
|
||||||
|
vim.keymap.set("n", "<C-n>", function() harpoon:list():select(3) end)
|
||||||
|
vim.keymap.set("n", "<C-s>", function() harpoon:list():select(4) end)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<C-S-P>", function() harpoon:list():prev() end)
|
||||||
|
vim.keymap.set("n", "<C-S-N>", function() harpoon:list():next() end)
|
||||||
|
|
||||||
|
-- vim.keymap.set("n", "<leader>a", ":lua harpoon:list():add()")
|
||||||
|
-- vim.keymap.set("n", "<C-e>", ":lua harpoon.ui:toggle_quick_menu(harpoon:list())<CR>")
|
||||||
|
--
|
||||||
|
-- vim.keymap.set("n", "<C-h>", "harpoon:list():select(1)")
|
||||||
|
-- vim.keymap.set("n", "<C-t>", "harpoon:list():select(2)")
|
||||||
|
-- vim.keymap.set("n", "<C-n>", "harpoon:list():select(3)")
|
||||||
|
-- vim.keymap.set("n", "<C-s>", "harpoon:list():select(4)")
|
||||||
|
--
|
||||||
|
-- vim.keymap.set("n", "<C-S-P>", "harpoon:list():prev()")
|
||||||
|
-- vim.keymap.set("n", "<C-S-N>", "harpoon:list():next()")
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
name = "plenary"
|
name = "plenary",
|
||||||
},
|
},
|
||||||
|
|
||||||
-- "github/copilot.vim",
|
-- "github/copilot.vim",
|
||||||
-- "eandrju/cellular-automaton.nvim",
|
-- "eandrju/cellular-automaton.nvim",
|
||||||
-- "gpanders/editorconfig.nvim",
|
-- "gpanders/editorconfig.nvim",
|
||||||
}
|
}
|
||||||
|
|||||||
10
lua/stevenmm/lazy/jest.lua
Normal file
10
lua/stevenmm/lazy/jest.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
"mattkubej/jest.nvim",
|
||||||
|
config = function()
|
||||||
|
local jest = require("nvim-jest")
|
||||||
|
|
||||||
|
jest.setup({
|
||||||
|
silent = false,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
19
lua/stevenmm/lazy/lazydev.lua
Normal file
19
lua/stevenmm/lazy/lazydev.lua
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
return {
|
||||||
|
"folke/lazydev.nvim",
|
||||||
|
ft = "lua",
|
||||||
|
opts = {
|
||||||
|
library = {
|
||||||
|
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||||
|
"LazyVim",
|
||||||
|
},
|
||||||
|
integrations = {
|
||||||
|
cmp = true,
|
||||||
|
lspconfig = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- config = function()
|
||||||
|
-- local lazydev = require("lazydev.nvim")
|
||||||
|
--
|
||||||
|
-- lazydev.setup({})
|
||||||
|
-- end,
|
||||||
|
}
|
||||||
@@ -1,58 +1,83 @@
|
|||||||
return {
|
return {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
|
|
||||||
-- Load each package config using the dependencies order
|
-- Load each package config using the dependencies order
|
||||||
dependencies = {
|
dependencies = {
|
||||||
|
|
||||||
-- mason configs:
|
-- mason configs:
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
|
||||||
-- cmp configs:
|
"folke/lazydev.nvim",
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
|
||||||
"hrsh7th/cmp-buffer",
|
|
||||||
"hrsh7th/cmp-path",
|
|
||||||
"hrsh7th/cmp-cmdline",
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
|
|
||||||
-- LuaSnip config:
|
-- cmp configs:
|
||||||
"L3MON4D3/LuaSnip",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
"saadparwaiz1/cmp_luasnip",
|
"hrsh7th/cmp-buffer",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
"hrsh7th/cmp-cmdline",
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
|
||||||
"nvim-svelte/nvim-svelte-snippets",
|
-- LuaSnip config:
|
||||||
|
"L3MON4D3/LuaSnip",
|
||||||
|
"saadparwaiz1/cmp_luasnip",
|
||||||
|
|
||||||
-- fidget config:
|
"nvim-svelte/nvim-svelte-snippets",
|
||||||
"j-hui/fidget.nvim",
|
|
||||||
},
|
|
||||||
|
|
||||||
config = function()
|
-- fidget config:
|
||||||
print("lsp.lua")
|
"j-hui/fidget.nvim",
|
||||||
|
},
|
||||||
|
|
||||||
require("fidget").setup({})
|
config = function()
|
||||||
|
-- print("lsp.lua")
|
||||||
|
local lspconfig = require("lspconfig")
|
||||||
|
require("fidget").setup({})
|
||||||
|
|
||||||
vim.diagnostic.config({
|
lspconfig.lua_ls.setup({
|
||||||
-- virtual_text = false,
|
settings = {
|
||||||
signs = {
|
Lua = {
|
||||||
text = {
|
runtime = {
|
||||||
[vim.diagnostic.severity.ERROR] = '',
|
version = "LuaJIT",
|
||||||
[vim.diagnostic.severity.WARN] = '',
|
},
|
||||||
[vim.diagnostic.severity.INFO] = '',
|
format = {
|
||||||
[vim.diagnostic.severity.HINT] = '',
|
enable = false,
|
||||||
}
|
},
|
||||||
},
|
diagnostics = {
|
||||||
update_in_insert = true,
|
globals = {
|
||||||
float = {
|
"vim",
|
||||||
focusable = true,
|
},
|
||||||
style = "minimal",
|
},
|
||||||
border = "rounded",
|
workspace = {
|
||||||
source = "always",
|
library = vim.api.nvim_get_runtime_file("", true),
|
||||||
header = "",
|
},
|
||||||
prefix = "",
|
telemetry = {
|
||||||
},
|
enable = false,
|
||||||
})
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
-- vim.o.updatetime = 250
|
vim.diagnostic.config({
|
||||||
-- vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]
|
-- virtual_text = false,
|
||||||
end
|
signs = {
|
||||||
|
text = {
|
||||||
|
[vim.diagnostic.severity.ERROR] = "",
|
||||||
|
[vim.diagnostic.severity.WARN] = "",
|
||||||
|
[vim.diagnostic.severity.INFO] = "",
|
||||||
|
[vim.diagnostic.severity.HINT] = "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
update_in_insert = true,
|
||||||
|
float = {
|
||||||
|
focusable = true,
|
||||||
|
style = "minimal",
|
||||||
|
border = "rounded",
|
||||||
|
source = "always",
|
||||||
|
header = "",
|
||||||
|
prefix = "",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- vim.o.updatetime = 250
|
||||||
|
-- vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,136 +19,134 @@ local nvimtree = {
|
|||||||
-- }
|
-- }
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- "lua.stevenmm.variables",
|
-- "lua.stevenmm.variables",
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
},
|
},
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 999,
|
priority = 999,
|
||||||
config = function()
|
config = function()
|
||||||
local lualine = require('lualine')
|
local lualine = require("lualine")
|
||||||
lualine.setup({
|
lualine.setup({
|
||||||
options = {
|
options = {
|
||||||
theme = 'auto',
|
theme = "auto",
|
||||||
section_separators = { left = "", right = "" },
|
section_separators = { left = "", right = "" },
|
||||||
-- always_show_tabline = false,
|
-- always_show_tabline = false,
|
||||||
-- ignore_focus = {},
|
-- ignore_focus = {},
|
||||||
-- icons_enabled = true,
|
-- icons_enabled = true,
|
||||||
-- refresh = {
|
-- refresh = {
|
||||||
-- statusline = 100,
|
-- statusline = 100,
|
||||||
-- tabline = 100,
|
-- tabline = 100,
|
||||||
-- winbar = 100,
|
-- winbar = 100,
|
||||||
-- },
|
-- },
|
||||||
disabled_filetypes = {
|
disabled_filetypes = {
|
||||||
statusline = EXCLUDED_FILETYPES_ARRAY,
|
statusline = EXCLUDED_FILETYPES_ARRAY,
|
||||||
winbar = EXCLUDED_FILETYPES_ARRAY,
|
winbar = EXCLUDED_FILETYPES_ARRAY,
|
||||||
},
|
},
|
||||||
globalstatus = true,
|
globalstatus = true,
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = {
|
lualine_a = {
|
||||||
-- {
|
-- {
|
||||||
-- 'buffers',
|
-- 'buffers',
|
||||||
-- show_filename_only = true,
|
-- show_filename_only = true,
|
||||||
-- show_modified_status = false,
|
-- show_modified_status = false,
|
||||||
-- mode = 4,
|
-- mode = 4,
|
||||||
-- filetype_names = {
|
-- filetype_names = {
|
||||||
-- NvimTree = 'NvimTree'
|
-- NvimTree = 'NvimTree'
|
||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
{
|
{
|
||||||
'mode',
|
"mode",
|
||||||
-- fmt = function(str) return '[' .. str:sub(1,2) .. ']' end,
|
-- fmt = function(str) return '[' .. str:sub(1,2) .. ']' end,
|
||||||
-- separator = "|"
|
-- separator = "|"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
lualine_b = {
|
lualine_b = {
|
||||||
{
|
{
|
||||||
'branch',
|
"branch",
|
||||||
separator = ""
|
separator = "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'diff',
|
"diff",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
lualine_c = {
|
lualine_c = {
|
||||||
{
|
{
|
||||||
'filetype',
|
"filetype",
|
||||||
-- icons_enabled = true,
|
-- icons_enabled = true,
|
||||||
icon_only = false,
|
icon_only = false,
|
||||||
icon = { align = 'left' },
|
icon = { align = "left" },
|
||||||
separator = "",
|
separator = "",
|
||||||
},
|
},
|
||||||
-- {
|
-- {
|
||||||
-- -- 'filetype',
|
-- -- 'filetype',
|
||||||
-- 'filename',
|
-- 'filename',
|
||||||
-- -- icons_enabled = true,
|
-- -- icons_enabled = true,
|
||||||
-- -- file_status = false,
|
-- -- file_status = false,
|
||||||
-- -- newfile_status = false,
|
-- -- newfile_status = false,
|
||||||
-- -- path = 0,
|
-- -- path = 0,
|
||||||
-- -- fmt = string.lower,
|
-- -- fmt = string.lower,
|
||||||
-- -- shorting_target = 40,
|
-- -- shorting_target = 40,
|
||||||
--
|
--
|
||||||
-- symbols = {
|
-- symbols = {
|
||||||
-- modified = '[+]',
|
-- modified = '[+]',
|
||||||
-- readonly = '[-]',
|
-- readonly = '[-]',
|
||||||
-- unamed = '[No Name]',
|
-- unamed = '[No Name]',
|
||||||
-- newfile = '[New]',
|
-- newfile = '[New]',
|
||||||
-- },
|
-- },
|
||||||
-- }
|
-- }
|
||||||
},
|
},
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
{
|
{
|
||||||
require("lazy.status").updates,
|
require("lazy.status").updates,
|
||||||
cond = require("lazy.status").has_updates,
|
cond = require("lazy.status").has_updates,
|
||||||
color = { fg = "#ff9e64" },
|
color = { fg = "#ff9e64" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'diagnostics',
|
"diagnostics",
|
||||||
update_in_insert = true,
|
update_in_insert = true,
|
||||||
separator = "",
|
separator = "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
lualine_y = {
|
lualine_y = {
|
||||||
{
|
{
|
||||||
'location',
|
"location",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
lualine_z = {
|
lualine_z = {
|
||||||
{
|
{
|
||||||
'datetime',
|
"datetime",
|
||||||
-- icons_enabled = true,
|
-- icons_enabled = true,
|
||||||
-- icon = { '' },
|
-- icon = { '' },
|
||||||
-- separator = "🌴",
|
-- separator = "🌴",
|
||||||
style = '%H:%M:%S',
|
style = "%H:%M:%S",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
inactive_sections = {
|
inactive_sections = {
|
||||||
lualine_a = {},
|
lualine_a = {},
|
||||||
lualine_b = {},
|
lualine_b = {},
|
||||||
lualine_c = {
|
lualine_c = {
|
||||||
{
|
{
|
||||||
"filetypes",
|
"filetypes",
|
||||||
icon_only = true,
|
icon_only = true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename",
|
"filename",
|
||||||
path = 1,
|
path = 1,
|
||||||
-- fmt = format_name
|
-- fmt = format_name
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
lualine_x = {},
|
||||||
lualine_x = {},
|
lualine_y = {},
|
||||||
lualine_y = {},
|
lualine_z = {},
|
||||||
lualine_z = {},
|
},
|
||||||
},
|
winbar = {},
|
||||||
winbar = {
|
extensions = {
|
||||||
},
|
nvimtree,
|
||||||
extensions = {
|
},
|
||||||
nvimtree
|
})
|
||||||
},
|
end,
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,62 +1,87 @@
|
|||||||
return {
|
return {
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
},
|
"jay-babu/mason-null-ls.nvim",
|
||||||
config = function ()
|
},
|
||||||
print('mason.lua')
|
config = function()
|
||||||
local capabilities = vim.tbl_deep_extend(
|
-- print('mason.lua')
|
||||||
"force",
|
local lspconfig = require("lspconfig")
|
||||||
{},
|
|
||||||
vim.lsp.protocol.make_client_capabilities(),
|
|
||||||
require('cmp_nvim_lsp').default_capabilities()
|
|
||||||
)
|
|
||||||
|
|
||||||
require('mason').setup({})
|
local capabilities = vim.tbl_deep_extend(
|
||||||
require('mason-lspconfig').setup({
|
"force",
|
||||||
ensure_installed = {
|
{},
|
||||||
"gopls",
|
vim.lsp.protocol.make_client_capabilities(),
|
||||||
"clangd",
|
require("cmp_nvim_lsp").default_capabilities()
|
||||||
"lua_ls",
|
)
|
||||||
"rust_analyzer",
|
|
||||||
-- "php"
|
|
||||||
-- "tsserver",
|
|
||||||
},
|
|
||||||
handlers = {
|
|
||||||
function(server_name) -- default handler (optional)
|
|
||||||
require("lspconfig")[server_name].setup {
|
|
||||||
capabilities = capabilities
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
|
|
||||||
["lua_ls"] = function()
|
require("mason").setup({})
|
||||||
local lspconfig = require("lspconfig")
|
require("mason-lspconfig").setup({
|
||||||
lspconfig.lua_ls.setup {
|
ensure_installed = {
|
||||||
capabilities = capabilities,
|
"ts_ls",
|
||||||
settings = {
|
"gopls",
|
||||||
Lua = {
|
"clangd",
|
||||||
diagnostics = {
|
"rust_analyzer",
|
||||||
globals = { "vim", "it", "describe", "before_each", "after_each" },
|
-- "lua_ls",
|
||||||
}
|
-- "php"
|
||||||
}
|
},
|
||||||
}
|
handlers = {
|
||||||
}
|
function(server_name) -- default handler (optional)
|
||||||
end,
|
require("lspconfig")[server_name].setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
["ts_ls"] = function()
|
||||||
|
-- local function organize_imports()
|
||||||
|
-- local params = {
|
||||||
|
-- command = "_typescript.organizeImports",
|
||||||
|
-- arguments = { vim.api.nvim_buf_get_name(0) },
|
||||||
|
-- title = "",
|
||||||
|
-- }
|
||||||
|
-- vim.lsp.buf.execute_command(params)
|
||||||
|
-- end
|
||||||
|
lspconfig.ts_ls.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
-- commands = {
|
||||||
|
-- OrganizeImports = {
|
||||||
|
-- organize_imports(),
|
||||||
|
-- description = "Organize Imports",
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
-- ["lua_ls"] = function()
|
||||||
|
-- local lspconfig = require("lspconfig")
|
||||||
|
-- lspconfig.lua_ls.setup({
|
||||||
|
-- capabilities = capabilities,
|
||||||
|
-- settings = {
|
||||||
|
-- Lua = {
|
||||||
|
-- -- workspace = {
|
||||||
|
-- -- checkThirdParty = false,
|
||||||
|
-- -- library = vim.api.nvim_get_runtime_file("", true),
|
||||||
|
-- -- },
|
||||||
|
-- diagnostics = {
|
||||||
|
-- globals = { "vim", "it", "describe", "before_each", "after_each" },
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- })
|
||||||
|
-- end,
|
||||||
|
|
||||||
["clangd"] = function ()
|
["clangd"] = function()
|
||||||
local lspconfig = require("lspconfig")
|
-- local lspconfig = require("lspconfig")
|
||||||
lspconfig.clangd.setup({
|
lspconfig.clangd.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
["gopls"] = function ()
|
["gopls"] = function()
|
||||||
local lspconfig = require("lspconfig")
|
-- local lspconfig = require("lspconfig")
|
||||||
lspconfig.gopls.setup {
|
lspconfig.gopls.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
}
|
})
|
||||||
end
|
end,
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
end
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
return {
|
return {
|
||||||
'echasnovski/mini.comment',
|
"echasnovski/mini.comment",
|
||||||
version = false,
|
version = false,
|
||||||
config = function()
|
config = function()
|
||||||
require('mini.comment').setup({
|
require("mini.comment").setup({
|
||||||
options = {
|
options = {
|
||||||
custom_commentstring = function()
|
custom_commentstring = function()
|
||||||
return require('ts_context_commentstring').calculate_commentstring() or vim.bo.commentstring
|
return require("ts_context_commentstring").calculate_commentstring() or vim.bo.commentstring
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
'echasnovski/mini.indentscope',
|
"echasnovski/mini.indentscope",
|
||||||
version = false,
|
version = false,
|
||||||
config = function ()
|
config = function()
|
||||||
require('mini.indentscope').setup()
|
require("mini.indentscope").setup()
|
||||||
end
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
'echasnovski/mini.move',
|
"echasnovski/mini.move",
|
||||||
version = false,
|
version = false,
|
||||||
config = function ()
|
config = function()
|
||||||
require('mini.move').setup()
|
require("mini.move").setup()
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
'echasnovski/mini.pairs',
|
"echasnovski/mini.pairs",
|
||||||
version = false,
|
version = false,
|
||||||
config = function ()
|
config = function()
|
||||||
require('mini.pairs').setup()
|
require("mini.pairs").setup()
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
'echasnovski/mini.surround',
|
"echasnovski/mini.surround",
|
||||||
version = false,
|
version = false,
|
||||||
config = function ()
|
config = function()
|
||||||
require('mini.surround').setup()
|
require("mini.surround").setup()
|
||||||
end
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
return {
|
return {
|
||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
config = true
|
config = true,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-tree/nvim-tree.lua",
|
"nvim-tree/nvim-tree.lua",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
},
|
},
|
||||||
|
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-tree").setup({
|
require("nvim-tree").setup({
|
||||||
renderer = {
|
renderer = {
|
||||||
icons = {
|
icons = {
|
||||||
web_devicons = {
|
web_devicons = {
|
||||||
file = {
|
file = {
|
||||||
enable = true,
|
enable = true,
|
||||||
color = true,
|
color = true,
|
||||||
},
|
},
|
||||||
folder = {
|
folder = {
|
||||||
enable = true,
|
enable = true,
|
||||||
color = true,
|
color = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
return {
|
|
||||||
"prettier/vim-prettier",
|
|
||||||
|
|
||||||
-- config = function()
|
|
||||||
-- require("vim-prettier").setup()
|
|
||||||
-- end,
|
|
||||||
}
|
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
-- print('telescope.lua loaded')
|
-- print('telescope.lua loaded')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"nvim-telescope/telescope-file-browser.nvim",
|
"nvim-telescope/telescope-file-browser.nvim",
|
||||||
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
-- "nvim-lua/plenary.nvim"
|
-- "nvim-lua/plenary.nvim"
|
||||||
},
|
},
|
||||||
|
|
||||||
config = function ()
|
config = function ()
|
||||||
local telescope = require('telescope')
|
local telescope = require('telescope')
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ end
|
|||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = "stevenmm.lazy",
|
spec = "stevenmm.lazy",
|
||||||
change_detection = { notify = false },
|
change_detection = { notify = false },
|
||||||
'JoosepAlviste/nvim-ts-context-commentstring',
|
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||||
-- "nvim-lua/plenary.nvim"
|
-- "nvim-lua/plenary.nvim"
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,11 +1,31 @@
|
|||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
|
|
||||||
local keyset = vim.keymap.set
|
local keyset = vim.keymap.set
|
||||||
|
local function noremap_opts(cmd_description)
|
||||||
|
return { noremap = true, silent = true, desc = cmd_description }
|
||||||
|
end
|
||||||
|
|
||||||
keyset("", "<Caps_lock>", "<Esc>")
|
-- Lazy:
|
||||||
|
keyset("n", "<leader>la", ":Lazy<CR>", { silent = true })
|
||||||
|
|
||||||
|
-- Mason:
|
||||||
keyset("n", "<leader>ma", ":Mason<CR>", { silent = true })
|
keyset("n", "<leader>ma", ":Mason<CR>", { silent = true })
|
||||||
|
|
||||||
|
-- NvimTree
|
||||||
keyset("n", "<leader>na", ":NvimTreeToggle<CR>", { silent = true })
|
keyset("n", "<leader>na", ":NvimTreeToggle<CR>", { silent = true })
|
||||||
keyset('n', '<leader>la', ":Lazy<CR>", { silent = true })
|
|
||||||
keyset("n", "<leader>fb", ":Telescope file_browser path=%:p:h<CR>", { noremap = true, silent = true })
|
-- Telescope:
|
||||||
keyset("n", "<leader>ha", ":Telescope harpoon marks<CR>", { noremap = true, silent = true })
|
keyset("n", "<leader>fb", ":Telescope file_browser path=%:p:h<CR>", noremap_opts("Telescope File Browser"))
|
||||||
keyset('n', '<leader>se', ":Telescope emoji<cr>", { desc = '[S]earch [E]moji' })
|
keyset("n", "<leader>ha", ":Telescope harpoon marks<CR>", noremap_opts("Telescope Harpoon"))
|
||||||
|
keyset("n", "<leader>se", ":Telescope emoji<CR>", { desc = "[S]earch [E]moji" })
|
||||||
|
|
||||||
|
-- Gitsigns:
|
||||||
|
keyset("n", "<leader>gp", ":Gitsigns preview_hunk<CR>", {})
|
||||||
|
keyset("n", "<leader>gt", ":Gitsigns toggle_current_line_blame<CR>", {})
|
||||||
|
|
||||||
|
-- Formatting:
|
||||||
|
keyset("n", "<leader>ff", ":lua vim.lsp.buf.format()<CR>", noremap_opts("Format Current File"))
|
||||||
|
|
||||||
|
-- keyset("", "<Caps_lock>", "<Esc>")
|
||||||
|
-- keyset("n", "<leader>p", ":Prettier<CR>", { noremap = true, silent = true })
|
||||||
|
-- keyset("n", "<leader>ff", ":lua vim.lsp.buf.format()<CR>", { noremap = true, silent = true, desc = "Format Current File" })
|
||||||
|
|||||||
@@ -3,12 +3,23 @@
|
|||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
vim.opt.encoding = 'UTF-8'
|
vim.opt.encoding = "UTF-8"
|
||||||
vim.opt.guifont = 'NotoSansM Nerd Font Mono'
|
vim.opt.guifont = "NotoSansM Nerd Font Mono"
|
||||||
|
|
||||||
|
vim.opt.clipboard = "unnamedplus"
|
||||||
|
|
||||||
|
vim.opt.inccommand = "split"
|
||||||
|
vim.opt.splitright = true
|
||||||
|
-- vim.opt.splitbelow = true
|
||||||
|
|
||||||
|
-- vim.opt.tabstop = 4
|
||||||
|
-- vim.opt.softtabstop = 4
|
||||||
|
-- vim.opt.shiftwidth = 4
|
||||||
|
|
||||||
|
vim.opt.tabstop = 2
|
||||||
|
vim.opt.softtabstop = 2
|
||||||
|
vim.opt.shiftwidth = 2
|
||||||
|
|
||||||
vim.opt.tabstop = 4
|
|
||||||
vim.opt.softtabstop = 4
|
|
||||||
vim.opt.shiftwidth = 4
|
|
||||||
vim.opt.smarttab = false
|
vim.opt.smarttab = false
|
||||||
vim.opt.expandtab = true
|
vim.opt.expandtab = true
|
||||||
|
|
||||||
@@ -24,12 +35,12 @@ vim.opt.colorcolumn = "80"
|
|||||||
vim.opt.swapfile = false
|
vim.opt.swapfile = false
|
||||||
vim.opt.backup = false
|
vim.opt.backup = false
|
||||||
|
|
||||||
if vim.fn.has('win32') or vim.fn.has('win64') then
|
if vim.fn.has("win32") or vim.fn.has("win64") then
|
||||||
vim.opt.undodir = os.getenv("XDG_CONFIG_HOME") .. "/.vim/undodir"
|
vim.opt.undodir = os.getenv("XDG_CONFIG_HOME") .. "/.vim/undodir"
|
||||||
vim.opt.shell = 'powershell.exe'
|
vim.opt.shell = "powershell.exe"
|
||||||
else
|
else
|
||||||
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||||
vim.opt.shell = 'bash'
|
vim.opt.shell = "bash"
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.opt.undofile = true
|
vim.opt.undofile = true
|
||||||
@@ -39,8 +50,12 @@ vim.opt.incsearch = true
|
|||||||
|
|
||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
|
|
||||||
vim.opt.scrolloff = 8
|
-- vim.opt.scrolloff = 8
|
||||||
|
vim.opt.scrolloff = 10
|
||||||
vim.opt.signcolumn = "yes"
|
vim.opt.signcolumn = "yes"
|
||||||
vim.opt.isfname:append("@-@")
|
vim.opt.isfname:append("@-@")
|
||||||
|
|
||||||
vim.opt.updatetime = 50
|
vim.opt.updatetime = 50
|
||||||
|
|
||||||
|
vim.opt.grepprg = "rg --vimgrep"
|
||||||
|
vim.opt.grepformat = "%f:%l:%c:%m"
|
||||||
|
|||||||
Reference in New Issue
Block a user