Added Formatters
This commit is contained in:
@@ -4,55 +4,62 @@ require("stevenmm.remap")
|
||||
require("stevenmm.lazy_init")
|
||||
|
||||
local augroup = vim.api.nvim_create_augroup
|
||||
local StevenmmGroup = augroup('Stevenmm', {})
|
||||
local StevenmmGroup = augroup("Stevenmm", {})
|
||||
|
||||
local autocmd = vim.api.nvim_create_autocmd
|
||||
local yank_group = augroup('HighlightYank', {})
|
||||
local yank_group = augroup("HighlightYank", {})
|
||||
|
||||
function R(name)
|
||||
require("plenary.reload").reload_module(name)
|
||||
require("plenary.reload").reload_module(name)
|
||||
end
|
||||
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
templ = 'templ',
|
||||
}
|
||||
extension = {
|
||||
templ = "templ",
|
||||
},
|
||||
})
|
||||
|
||||
autocmd('TextYankPost', {
|
||||
group = yank_group,
|
||||
pattern = '*',
|
||||
callback = function ()
|
||||
vim.highlight.on_yank({
|
||||
higroup = 'IncSearch',
|
||||
timeout = 40,
|
||||
})
|
||||
end,
|
||||
autocmd("TextYankPost", {
|
||||
group = yank_group,
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
vim.highlight.on_yank({
|
||||
higroup = "IncSearch",
|
||||
timeout = 40,
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
autocmd({"BufWritePre"}, {
|
||||
group = StevenmmGroup,
|
||||
pattern = "*",
|
||||
command = [[%s/\s\+$//e]],
|
||||
autocmd({ "BufWritePre" }, {
|
||||
group = StevenmmGroup,
|
||||
pattern = "*",
|
||||
command = [[%s/\s\+$//e]],
|
||||
})
|
||||
|
||||
autocmd('LspAttach', {
|
||||
group = StevenmmGroup,
|
||||
callback = function (e)
|
||||
local opts = { buffer = e.buf }
|
||||
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", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
|
||||
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
|
||||
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
|
||||
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.reference() end, opts)
|
||||
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() 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_next() end, opts)
|
||||
vim.keymap.set("n", "]d", function() vim.lsp.buf.goto_prev() end, opts)
|
||||
end
|
||||
autocmd("LspAttach", {
|
||||
group = StevenmmGroup,
|
||||
callback = function(e)
|
||||
local opts = { buffer = e.buf }
|
||||
-- vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
||||
vim.keymap.set("n", "gd", ":lua vim.lsp.buf.definition()<CR>", opts)
|
||||
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
|
||||
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
|
||||
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
|
||||
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
|
||||
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
|
||||
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() 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_next() end, opts)
|
||||
vim.keymap.set("n", "]d", function() vim.lsp.buf.goto_prev() end, opts)
|
||||
end,
|
||||
})
|
||||
|
||||
vim.g.netrw_browse_split = 0
|
||||
vim.g.netrw_banner = 0
|
||||
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 {
|
||||
-- "adalessa/laravel.nvim",
|
||||
-- dependencies = {
|
||||
|
||||
@@ -1,92 +1,105 @@
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
"hrsh7th/nvim-cmp",
|
||||
|
||||
dependencies = {
|
||||
"windwp/nvim-autopairs",
|
||||
dependencies = {
|
||||
"windwp/nvim-autopairs",
|
||||
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
|
||||
"L3MON4D3/LuaSnip",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"onsails/lspkind.nvim",
|
||||
},
|
||||
"L3MON4D3/LuaSnip",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"onsails/lspkind.nvim",
|
||||
},
|
||||
|
||||
config = function ()
|
||||
print("cmp.lua")
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
local cmp = require('cmp')
|
||||
local cmp_select = { behavior = cmp.SelectBehavior.Select }
|
||||
local lspkind = require("lspkind")
|
||||
-- opts = function(_, opts)
|
||||
-- opts.sources = vim.tbl_filter(function(source)
|
||||
-- return not vim.tbl_contains({ "buffer", "nvim_lsp" }, source.name)
|
||||
-- end, opts.sources)
|
||||
-- table.insert(opts.sources, 1, {
|
||||
-- name = "nvim_lsp",
|
||||
-- entry_filter = function(entry, _)
|
||||
-- return require("cmp.types").lsp.CompletionItemKind[entry:get_kind()] ~= "Text"
|
||||
-- end,
|
||||
-- })
|
||||
-- end,
|
||||
|
||||
cmp.event:on(
|
||||
'confirm_done',
|
||||
cmp_autopairs.on_confirm_done()
|
||||
)
|
||||
config = function()
|
||||
-- print("cmp.lua")
|
||||
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({
|
||||
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,
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
mode = 'symbol_text',
|
||||
max_width = {
|
||||
menu = 50,
|
||||
abbr = 50,
|
||||
},
|
||||
show_labelDetails = true
|
||||
}),
|
||||
},
|
||||
cmp.setup({
|
||||
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,
|
||||
|
||||
-- preselect = { cmp.PreselectMode.Item },
|
||||
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(-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' },
|
||||
}),
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
mode = "symbol_text",
|
||||
max_width = {
|
||||
menu = 50,
|
||||
abbr = 50,
|
||||
},
|
||||
show_labelDetails = true,
|
||||
}),
|
||||
},
|
||||
|
||||
})
|
||||
end
|
||||
-- preselect = { cmp.PreselectMode.Item },
|
||||
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")
|
||||
return {
|
||||
'nvim-zh/colorful-winsep.nvim',
|
||||
config = function ()
|
||||
local winsep = require("colorful-winsep")
|
||||
local bg = require("vscode.colors").get_colors().vscBack
|
||||
winsep.setup({
|
||||
highlight = {
|
||||
fg = "#A066E8",
|
||||
bg = bg,
|
||||
},
|
||||
no_exec_files = EXCLUDED_FILETYPES_ARRAY,
|
||||
symbols = { "─", "│", "╭", "╮", "╰", "╯" },
|
||||
})
|
||||
end
|
||||
"nvim-zh/colorful-winsep.nvim",
|
||||
config = function()
|
||||
local winsep = require("colorful-winsep")
|
||||
local bg = require("vscode.colors").get_colors().vscBack
|
||||
winsep.setup({
|
||||
highlight = {
|
||||
fg = "#A066E8",
|
||||
bg = bg,
|
||||
},
|
||||
no_exec_files = EXCLUDED_FILETYPES_ARRAY,
|
||||
symbols = { "─", "│", "╭", "╮", "╰", "╯" },
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
function ColorMyPencils(color)
|
||||
-- color = color or "rose-pine-moon"
|
||||
color = color or "vscode"
|
||||
vim.cmd.colorscheme(color)
|
||||
-- color = color or "rose-pine-moon"
|
||||
color = color or "vscode"
|
||||
vim.cmd.colorscheme(color)
|
||||
|
||||
vim.api.nvim_set_hl(0, "Normal", {bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
{
|
||||
-- "rose-pine/neovim",
|
||||
"Mofiqul/vscode.nvim",
|
||||
-- name = "rose-pine",
|
||||
name = "vscode",
|
||||
lazy = false,
|
||||
prority = 1000,
|
||||
lazy = false,
|
||||
prority = 1000,
|
||||
config = function()
|
||||
-- require("rose-pine").setup({
|
||||
require("vscode").setup({
|
||||
transparent = true,
|
||||
italic_comments = true,
|
||||
-- styles = {
|
||||
-- bold = false,
|
||||
-- italic = false,
|
||||
-- transparency = true,
|
||||
-- },
|
||||
-- disable_background = true,
|
||||
})
|
||||
-- require("rose-pine").setup({
|
||||
require("vscode").setup({
|
||||
transparent = true,
|
||||
italic_comments = true,
|
||||
-- styles = {
|
||||
-- bold = false,
|
||||
-- italic = false,
|
||||
-- transparency = true,
|
||||
-- },
|
||||
-- disable_background = true,
|
||||
})
|
||||
|
||||
vim.cmd("colorscheme vscode")
|
||||
vim.cmd("colorscheme vscode")
|
||||
|
||||
ColorMyPencils()
|
||||
end
|
||||
},
|
||||
ColorMyPencils()
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
return {
|
||||
'JoosepAlviste/nvim-ts-context-commentstring',
|
||||
config = function ()
|
||||
require('ts_context_commentstring').setup({
|
||||
enable_autocmd = false,
|
||||
})
|
||||
end
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
config = function()
|
||||
require("ts_context_commentstring").setup({
|
||||
enable_autocmd = false,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return {
|
||||
"allaman/emoji.nvim",
|
||||
version = "1.0.0", -- optionally pin to a tag
|
||||
ft = "markdown", -- adjust to your needs
|
||||
ft = "markdown", -- adjust to your needs
|
||||
dependencies = {
|
||||
-- util for handling paths
|
||||
"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 {
|
||||
"ThePrimeagen/harpoon",
|
||||
branch = "harpoon2",
|
||||
-- dependencies = {
|
||||
-- "nvim-lua/plenary.nvim"
|
||||
-- },
|
||||
"ThePrimeagen/harpoon",
|
||||
branch = "harpoon2",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
|
||||
global_settings = {
|
||||
-- global_settings = {
|
||||
--
|
||||
-- },
|
||||
|
||||
},
|
||||
config = function()
|
||||
local harpoon = require("harpoon")
|
||||
|
||||
-- config = function ()
|
||||
-- local harpoon = require('harpoon')
|
||||
-- harpoon:setup({})
|
||||
--
|
||||
-- -- vim.keymap.set("n", "<leader>a", function () harpoon:list():add() end)
|
||||
--
|
||||
-- end
|
||||
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", "<C-h>", function() harpoon:list():select(1) 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 {
|
||||
{
|
||||
"nvim-lua/plenary.nvim",
|
||||
name = "plenary"
|
||||
},
|
||||
{
|
||||
"nvim-lua/plenary.nvim",
|
||||
name = "plenary",
|
||||
},
|
||||
|
||||
-- "github/copilot.vim",
|
||||
-- "eandrju/cellular-automaton.nvim",
|
||||
-- "gpanders/editorconfig.nvim",
|
||||
-- "github/copilot.vim",
|
||||
-- "eandrju/cellular-automaton.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 {
|
||||
"neovim/nvim-lspconfig",
|
||||
"neovim/nvim-lspconfig",
|
||||
|
||||
-- Load each package config using the dependencies order
|
||||
dependencies = {
|
||||
-- Load each package config using the dependencies order
|
||||
dependencies = {
|
||||
|
||||
-- mason configs:
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
-- mason configs:
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
|
||||
-- cmp configs:
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/nvim-cmp",
|
||||
"folke/lazydev.nvim",
|
||||
|
||||
-- LuaSnip config:
|
||||
"L3MON4D3/LuaSnip",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
-- cmp configs:
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"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:
|
||||
"j-hui/fidget.nvim",
|
||||
},
|
||||
"nvim-svelte/nvim-svelte-snippets",
|
||||
|
||||
config = function()
|
||||
print("lsp.lua")
|
||||
-- fidget config:
|
||||
"j-hui/fidget.nvim",
|
||||
},
|
||||
|
||||
require("fidget").setup({})
|
||||
config = function()
|
||||
-- print("lsp.lua")
|
||||
local lspconfig = require("lspconfig")
|
||||
require("fidget").setup({})
|
||||
|
||||
vim.diagnostic.config({
|
||||
-- virtual_text = false,
|
||||
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 = "",
|
||||
},
|
||||
})
|
||||
lspconfig.lua_ls.setup({
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = "LuaJIT",
|
||||
},
|
||||
format = {
|
||||
enable = false,
|
||||
},
|
||||
diagnostics = {
|
||||
globals = {
|
||||
"vim",
|
||||
},
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
},
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- vim.o.updatetime = 250
|
||||
-- vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]
|
||||
end
|
||||
vim.diagnostic.config({
|
||||
-- virtual_text = false,
|
||||
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 {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = {
|
||||
-- "lua.stevenmm.variables",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
lazy = false,
|
||||
priority = 999,
|
||||
config = function()
|
||||
local lualine = require('lualine')
|
||||
lualine.setup({
|
||||
options = {
|
||||
theme = 'auto',
|
||||
section_separators = { left = "", right = "" },
|
||||
-- always_show_tabline = false,
|
||||
-- ignore_focus = {},
|
||||
-- icons_enabled = true,
|
||||
-- refresh = {
|
||||
-- statusline = 100,
|
||||
-- tabline = 100,
|
||||
-- winbar = 100,
|
||||
-- },
|
||||
disabled_filetypes = {
|
||||
statusline = EXCLUDED_FILETYPES_ARRAY,
|
||||
winbar = EXCLUDED_FILETYPES_ARRAY,
|
||||
},
|
||||
globalstatus = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {
|
||||
-- {
|
||||
-- 'buffers',
|
||||
-- show_filename_only = true,
|
||||
-- show_modified_status = false,
|
||||
-- mode = 4,
|
||||
-- filetype_names = {
|
||||
-- NvimTree = 'NvimTree'
|
||||
-- },
|
||||
-- },
|
||||
{
|
||||
'mode',
|
||||
-- fmt = function(str) return '[' .. str:sub(1,2) .. ']' end,
|
||||
-- separator = "|"
|
||||
},
|
||||
},
|
||||
lualine_b = {
|
||||
{
|
||||
'branch',
|
||||
separator = ""
|
||||
},
|
||||
{
|
||||
'diff',
|
||||
},
|
||||
},
|
||||
lualine_c = {
|
||||
{
|
||||
'filetype',
|
||||
-- icons_enabled = true,
|
||||
icon_only = false,
|
||||
icon = { align = 'left' },
|
||||
separator = "",
|
||||
},
|
||||
-- {
|
||||
-- -- 'filetype',
|
||||
-- 'filename',
|
||||
-- -- icons_enabled = true,
|
||||
-- -- file_status = false,
|
||||
-- -- newfile_status = false,
|
||||
-- -- path = 0,
|
||||
-- -- fmt = string.lower,
|
||||
-- -- shorting_target = 40,
|
||||
--
|
||||
-- symbols = {
|
||||
-- modified = '[+]',
|
||||
-- readonly = '[-]',
|
||||
-- unamed = '[No Name]',
|
||||
-- newfile = '[New]',
|
||||
-- },
|
||||
-- }
|
||||
},
|
||||
lualine_x = {
|
||||
{
|
||||
require("lazy.status").updates,
|
||||
cond = require("lazy.status").has_updates,
|
||||
color = { fg = "#ff9e64" },
|
||||
},
|
||||
{
|
||||
'diagnostics',
|
||||
update_in_insert = true,
|
||||
separator = "",
|
||||
},
|
||||
},
|
||||
lualine_y = {
|
||||
{
|
||||
'location',
|
||||
},
|
||||
},
|
||||
lualine_z = {
|
||||
{
|
||||
'datetime',
|
||||
-- icons_enabled = true,
|
||||
-- icon = { '' },
|
||||
-- separator = "🌴",
|
||||
style = '%H:%M:%S',
|
||||
},
|
||||
},
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {
|
||||
{
|
||||
"filetypes",
|
||||
icon_only = true,
|
||||
},
|
||||
{
|
||||
"filename",
|
||||
path = 1,
|
||||
-- fmt = format_name
|
||||
|
||||
},
|
||||
},
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
winbar = {
|
||||
},
|
||||
extensions = {
|
||||
nvimtree
|
||||
},
|
||||
})
|
||||
end,
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = {
|
||||
-- "lua.stevenmm.variables",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
lazy = false,
|
||||
priority = 999,
|
||||
config = function()
|
||||
local lualine = require("lualine")
|
||||
lualine.setup({
|
||||
options = {
|
||||
theme = "auto",
|
||||
section_separators = { left = "", right = "" },
|
||||
-- always_show_tabline = false,
|
||||
-- ignore_focus = {},
|
||||
-- icons_enabled = true,
|
||||
-- refresh = {
|
||||
-- statusline = 100,
|
||||
-- tabline = 100,
|
||||
-- winbar = 100,
|
||||
-- },
|
||||
disabled_filetypes = {
|
||||
statusline = EXCLUDED_FILETYPES_ARRAY,
|
||||
winbar = EXCLUDED_FILETYPES_ARRAY,
|
||||
},
|
||||
globalstatus = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {
|
||||
-- {
|
||||
-- 'buffers',
|
||||
-- show_filename_only = true,
|
||||
-- show_modified_status = false,
|
||||
-- mode = 4,
|
||||
-- filetype_names = {
|
||||
-- NvimTree = 'NvimTree'
|
||||
-- },
|
||||
-- },
|
||||
{
|
||||
"mode",
|
||||
-- fmt = function(str) return '[' .. str:sub(1,2) .. ']' end,
|
||||
-- separator = "|"
|
||||
},
|
||||
},
|
||||
lualine_b = {
|
||||
{
|
||||
"branch",
|
||||
separator = "",
|
||||
},
|
||||
{
|
||||
"diff",
|
||||
},
|
||||
},
|
||||
lualine_c = {
|
||||
{
|
||||
"filetype",
|
||||
-- icons_enabled = true,
|
||||
icon_only = false,
|
||||
icon = { align = "left" },
|
||||
separator = "",
|
||||
},
|
||||
-- {
|
||||
-- -- 'filetype',
|
||||
-- 'filename',
|
||||
-- -- icons_enabled = true,
|
||||
-- -- file_status = false,
|
||||
-- -- newfile_status = false,
|
||||
-- -- path = 0,
|
||||
-- -- fmt = string.lower,
|
||||
-- -- shorting_target = 40,
|
||||
--
|
||||
-- symbols = {
|
||||
-- modified = '[+]',
|
||||
-- readonly = '[-]',
|
||||
-- unamed = '[No Name]',
|
||||
-- newfile = '[New]',
|
||||
-- },
|
||||
-- }
|
||||
},
|
||||
lualine_x = {
|
||||
{
|
||||
require("lazy.status").updates,
|
||||
cond = require("lazy.status").has_updates,
|
||||
color = { fg = "#ff9e64" },
|
||||
},
|
||||
{
|
||||
"diagnostics",
|
||||
update_in_insert = true,
|
||||
separator = "",
|
||||
},
|
||||
},
|
||||
lualine_y = {
|
||||
{
|
||||
"location",
|
||||
},
|
||||
},
|
||||
lualine_z = {
|
||||
{
|
||||
"datetime",
|
||||
-- icons_enabled = true,
|
||||
-- icon = { '' },
|
||||
-- separator = "🌴",
|
||||
style = "%H:%M:%S",
|
||||
},
|
||||
},
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {
|
||||
{
|
||||
"filetypes",
|
||||
icon_only = true,
|
||||
},
|
||||
{
|
||||
"filename",
|
||||
path = 1,
|
||||
-- fmt = format_name
|
||||
},
|
||||
},
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
winbar = {},
|
||||
extensions = {
|
||||
nvimtree,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,62 +1,87 @@
|
||||
return {
|
||||
"williamboman/mason.nvim",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
},
|
||||
config = function ()
|
||||
print('mason.lua')
|
||||
local capabilities = vim.tbl_deep_extend(
|
||||
"force",
|
||||
{},
|
||||
vim.lsp.protocol.make_client_capabilities(),
|
||||
require('cmp_nvim_lsp').default_capabilities()
|
||||
)
|
||||
"williamboman/mason.nvim",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"jay-babu/mason-null-ls.nvim",
|
||||
},
|
||||
config = function()
|
||||
-- print('mason.lua')
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
require('mason').setup({})
|
||||
require('mason-lspconfig').setup({
|
||||
ensure_installed = {
|
||||
"gopls",
|
||||
"clangd",
|
||||
"lua_ls",
|
||||
"rust_analyzer",
|
||||
-- "php"
|
||||
-- "tsserver",
|
||||
},
|
||||
handlers = {
|
||||
function(server_name) -- default handler (optional)
|
||||
require("lspconfig")[server_name].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
end,
|
||||
local capabilities = vim.tbl_deep_extend(
|
||||
"force",
|
||||
{},
|
||||
vim.lsp.protocol.make_client_capabilities(),
|
||||
require("cmp_nvim_lsp").default_capabilities()
|
||||
)
|
||||
|
||||
["lua_ls"] = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
lspconfig.lua_ls.setup {
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim", "it", "describe", "before_each", "after_each" },
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end,
|
||||
require("mason").setup({})
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
"ts_ls",
|
||||
"gopls",
|
||||
"clangd",
|
||||
"rust_analyzer",
|
||||
-- "lua_ls",
|
||||
-- "php"
|
||||
},
|
||||
handlers = {
|
||||
function(server_name) -- default handler (optional)
|
||||
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 ()
|
||||
local lspconfig = require("lspconfig")
|
||||
lspconfig.clangd.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
end,
|
||||
["gopls"] = function ()
|
||||
local lspconfig = require("lspconfig")
|
||||
lspconfig.gopls.setup {
|
||||
capabilities = capabilities,
|
||||
}
|
||||
end
|
||||
}
|
||||
})
|
||||
end
|
||||
["clangd"] = function()
|
||||
-- local lspconfig = require("lspconfig")
|
||||
lspconfig.clangd.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
end,
|
||||
["gopls"] = function()
|
||||
-- local lspconfig = require("lspconfig")
|
||||
lspconfig.gopls.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
end,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
return {
|
||||
'echasnovski/mini.comment',
|
||||
version = false,
|
||||
config = function()
|
||||
require('mini.comment').setup({
|
||||
options = {
|
||||
custom_commentstring = function()
|
||||
return require('ts_context_commentstring').calculate_commentstring() or vim.bo.commentstring
|
||||
end
|
||||
},
|
||||
})
|
||||
end
|
||||
"echasnovski/mini.comment",
|
||||
version = false,
|
||||
config = function()
|
||||
require("mini.comment").setup({
|
||||
options = {
|
||||
custom_commentstring = function()
|
||||
return require("ts_context_commentstring").calculate_commentstring() or vim.bo.commentstring
|
||||
end,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return {
|
||||
'echasnovski/mini.indentscope',
|
||||
version = false,
|
||||
config = function ()
|
||||
require('mini.indentscope').setup()
|
||||
end
|
||||
"echasnovski/mini.indentscope",
|
||||
version = false,
|
||||
config = function()
|
||||
require("mini.indentscope").setup()
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return {
|
||||
'echasnovski/mini.move',
|
||||
version = false,
|
||||
config = function ()
|
||||
require('mini.move').setup()
|
||||
end,
|
||||
"echasnovski/mini.move",
|
||||
version = false,
|
||||
config = function()
|
||||
require("mini.move").setup()
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return {
|
||||
'echasnovski/mini.pairs',
|
||||
version = false,
|
||||
config = function ()
|
||||
require('mini.pairs').setup()
|
||||
end,
|
||||
"echasnovski/mini.pairs",
|
||||
version = false,
|
||||
config = function()
|
||||
require("mini.pairs").setup()
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return {
|
||||
'echasnovski/mini.surround',
|
||||
version = false,
|
||||
config = function ()
|
||||
require('mini.surround').setup()
|
||||
end
|
||||
"echasnovski/mini.surround",
|
||||
version = false,
|
||||
config = function()
|
||||
require("mini.surround").setup()
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
config = true
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
config = true,
|
||||
}
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
return {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
|
||||
config = function()
|
||||
require("nvim-tree").setup({
|
||||
renderer = {
|
||||
icons = {
|
||||
web_devicons = {
|
||||
file = {
|
||||
enable = true,
|
||||
color = true,
|
||||
},
|
||||
folder = {
|
||||
enable = true,
|
||||
color = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
config = function()
|
||||
require("nvim-tree").setup({
|
||||
renderer = {
|
||||
icons = {
|
||||
web_devicons = {
|
||||
file = {
|
||||
enable = true,
|
||||
color = true,
|
||||
},
|
||||
folder = {
|
||||
enable = true,
|
||||
color = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
return {
|
||||
"prettier/vim-prettier",
|
||||
|
||||
-- config = function()
|
||||
-- require("vim-prettier").setup()
|
||||
-- end,
|
||||
}
|
||||
@@ -2,12 +2,12 @@
|
||||
-- print('telescope.lua loaded')
|
||||
|
||||
return {
|
||||
"nvim-telescope/telescope-file-browser.nvim",
|
||||
"nvim-telescope/telescope-file-browser.nvim",
|
||||
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
-- "nvim-lua/plenary.nvim"
|
||||
},
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
-- "nvim-lua/plenary.nvim"
|
||||
},
|
||||
|
||||
config = function ()
|
||||
local telescope = require('telescope')
|
||||
|
||||
@@ -12,8 +12,8 @@ end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = "stevenmm.lazy",
|
||||
change_detection = { notify = false },
|
||||
'JoosepAlviste/nvim-ts-context-commentstring',
|
||||
-- "nvim-lua/plenary.nvim"
|
||||
spec = "stevenmm.lazy",
|
||||
change_detection = { notify = false },
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
-- "nvim-lua/plenary.nvim"
|
||||
})
|
||||
|
||||
@@ -1,11 +1,31 @@
|
||||
vim.g.mapleader = " "
|
||||
|
||||
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 })
|
||||
|
||||
-- NvimTree
|
||||
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 })
|
||||
keyset("n", "<leader>ha", ":Telescope harpoon marks<CR>", { noremap = true, silent = true })
|
||||
keyset('n', '<leader>se', ":Telescope emoji<cr>", { desc = '[S]earch [E]moji' })
|
||||
|
||||
-- Telescope:
|
||||
keyset("n", "<leader>fb", ":Telescope file_browser path=%:p:h<CR>", noremap_opts("Telescope File Browser"))
|
||||
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.relativenumber = true
|
||||
|
||||
vim.opt.encoding = 'UTF-8'
|
||||
vim.opt.guifont = 'NotoSansM Nerd Font Mono'
|
||||
vim.opt.encoding = "UTF-8"
|
||||
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.expandtab = true
|
||||
|
||||
@@ -24,12 +35,12 @@ vim.opt.colorcolumn = "80"
|
||||
vim.opt.swapfile = 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.shell = 'powershell.exe'
|
||||
vim.opt.shell = "powershell.exe"
|
||||
else
|
||||
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||
vim.opt.shell = 'bash'
|
||||
vim.opt.shell = "bash"
|
||||
end
|
||||
|
||||
vim.opt.undofile = true
|
||||
@@ -39,8 +50,12 @@ vim.opt.incsearch = true
|
||||
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
vim.opt.scrolloff = 8
|
||||
-- vim.opt.scrolloff = 8
|
||||
vim.opt.scrolloff = 10
|
||||
vim.opt.signcolumn = "yes"
|
||||
vim.opt.isfname:append("@-@")
|
||||
|
||||
vim.opt.updatetime = 50
|
||||
|
||||
vim.opt.grepprg = "rg --vimgrep"
|
||||
vim.opt.grepformat = "%f:%l:%c:%m"
|
||||
|
||||
Reference in New Issue
Block a user