End of config for now
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
--- Ensure plugin is avaiable
|
||||
local ok, bufferline = pcall(require, "bufferline")
|
||||
if not ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
--- Plugin options
|
||||
opts = {
|
||||
options = {
|
||||
-- mode = "tabs",
|
||||
separator_style = "slant",
|
||||
},
|
||||
local opts = {
|
||||
options = {
|
||||
-- mode = "tabs",
|
||||
separator_style = "slant",
|
||||
},
|
||||
}
|
||||
|
||||
--- Load plugin
|
||||
@@ -17,8 +17,8 @@ bufferline.setup(opts)
|
||||
|
||||
--- Override keymaps
|
||||
local km = vim.keymap.set
|
||||
km("n", "<Tab>", ":BufferLineCycleNext<cr>")
|
||||
km("n", "<S-Tab>", ":BufferLineCyclePrev<cr>")
|
||||
km("n", "<Tab>", ":BufferLineCycleNext<cr>")
|
||||
km("n", "<S-Tab>", ":BufferLineCyclePrev<cr>")
|
||||
km("n", "<leader>bn", ":BufferLineMoveNext<cr>")
|
||||
km("n", "<leader>bp", ":BufferLineMovePrev<cr>")
|
||||
km("n", "<leader>bc", ":BufferLinePickClose<cr>")
|
||||
|
||||
@@ -11,3 +11,8 @@ require("config/rainbow-delimiters")
|
||||
require("config/telescope")
|
||||
require("config/which-key")
|
||||
require("config/nvim-cmp")
|
||||
require("config/mason")
|
||||
require("config/lsp/signs")
|
||||
require("config/lsp/bash")
|
||||
require("config/lsp/lua")
|
||||
require("config/lsp/web")
|
||||
|
||||
43
lua/config/lsp/attach.lua
Normal file
43
lua/config/lsp/attach.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
return function()
|
||||
local km = vim.keymap.set
|
||||
local opts = {}
|
||||
|
||||
opts.desc = "show documentation under cursor"
|
||||
km("n", "<leader>lK", vim.lsp.buf.hover, opts)
|
||||
|
||||
opts.desc = "show LSP References"
|
||||
km("n", "<leader>lR", ":Telescope lsp_references<cr>", opts)
|
||||
|
||||
opts.desc = "go to declaration"
|
||||
km("n", "<leader>lD", "vim.lsp.buf.declaration<cr>", opts)
|
||||
|
||||
opts.desc = "show LSP definition"
|
||||
km("n", "<leader>ld", ":Telescope lsp_definitions<cr>", opts)
|
||||
|
||||
opts.desc = "Show LSP implementations"
|
||||
km("n", "<leader>li", ":Telescope lsp_implementations<cr>", opts)
|
||||
|
||||
opts.desc = "Show LSP type definitions"
|
||||
km("n", "<leader>lt", ":Telescope lsp_type_definitions<cr>", opts)
|
||||
|
||||
opts.desc = "See available code actions"
|
||||
km({ "n", "v" }, "<leader>lc", vim.lsp.buf.code_action, opts)
|
||||
|
||||
opts.desc = "Smart rename"
|
||||
km("n", "<leader>ln", vim.lsp.buf.rename, opts)
|
||||
|
||||
opts.desc = "Show buffer diagnostics"
|
||||
km("n", "<leader>lE", ":Telescope diagnostics bufnr=0<cr>", opts)
|
||||
|
||||
opts.desc = "Show line diagnostics"
|
||||
km("n", "<leader>le", vim.diagnostic.open_float, opts)
|
||||
|
||||
opts.desc = "Go to previous diagnostic"
|
||||
km("n", "<leader>lp", vim.diagnostic.goto_prev, opts)
|
||||
|
||||
opts.desc = "Go to next diagnostic"
|
||||
km("n", "<leader>ln", vim.diagnostic.goto_next, opts)
|
||||
|
||||
opts.desc = "Restart LSP"
|
||||
km("n", "<leader>ls", ":LspRestart<cr>", opts)
|
||||
end
|
||||
57
lua/config/lsp/bash.lua
Normal file
57
lua/config/lsp/bash.lua
Normal file
@@ -0,0 +1,57 @@
|
||||
local ok, mason_lspconfig, mason_tool_installer, lspconfig, conform, lint = pcall(function()
|
||||
return require("mason-lspconfig"),
|
||||
require("mason-tool-installer"),
|
||||
require("lspconfig"),
|
||||
require("conform"),
|
||||
require("lint")
|
||||
end)
|
||||
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
|
||||
mason_lspconfig.setup({
|
||||
ensure_installed = { "bashls" },
|
||||
})
|
||||
|
||||
lspconfig.bashls.setup({
|
||||
capabilities = require("config/lsp/capabilities"),
|
||||
on_attach = require("config/lsp/attach"),
|
||||
})
|
||||
|
||||
mason_tool_installer.setup({
|
||||
ensure_installed = { "shellcheck" },
|
||||
})
|
||||
|
||||
conform.setup({
|
||||
formatters_by_ft = {
|
||||
sh = { "shellcheck" },
|
||||
},
|
||||
format_on_save = {
|
||||
async = false,
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = true,
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set({ "n", "v" }, "<leader>lf", function()
|
||||
conform.format({
|
||||
async = false,
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = true,
|
||||
})
|
||||
end, { desc = "Format" })
|
||||
|
||||
lint.linters_by_ft = {
|
||||
lua = { "shellcheck" },
|
||||
}
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||
callback = function()
|
||||
lint.try_lint()
|
||||
end,
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>ll", function()
|
||||
lint.try_lint()
|
||||
end, { desc = "Lint" })
|
||||
6
lua/config/lsp/capabilities.lua
Normal file
6
lua/config/lsp/capabilities.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
local ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
|
||||
return cmp_nvim_lsp.default_capabilities()
|
||||
73
lua/config/lsp/lua.lua
Normal file
73
lua/config/lsp/lua.lua
Normal file
@@ -0,0 +1,73 @@
|
||||
local ok, mason_lspconfig, mason_tool_installer, lspconfig, conform, lint = pcall(function()
|
||||
return require("mason-lspconfig"),
|
||||
require("mason-tool-installer"),
|
||||
require("lspconfig"),
|
||||
require("conform"),
|
||||
require("lint")
|
||||
end)
|
||||
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
|
||||
mason_lspconfig.setup({
|
||||
ensure_installed = { "lua_ls" },
|
||||
})
|
||||
|
||||
mason_tool_installer.setup({
|
||||
ensure_installed = { "stylua", "luacheck" },
|
||||
})
|
||||
|
||||
lspconfig.lua_ls.setup({
|
||||
-- capabilities = cmp_nvim_lsp.default_capabilities()
|
||||
capabilities = require("config/lsp/capabilities"),
|
||||
on_attach = require("config/lsp/attach"),
|
||||
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,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
conform.setup({
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
},
|
||||
format_on_save = {
|
||||
async = false,
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = true,
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set({ "n", "v" }, "<leader>lf", function()
|
||||
conform.format({
|
||||
async = false,
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = true,
|
||||
})
|
||||
end, { desc = "Format" })
|
||||
|
||||
lint.linters_by_ft = {
|
||||
lua = { "luacheck" },
|
||||
}
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||
callback = function()
|
||||
lint.try_lint()
|
||||
end,
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>ll", function()
|
||||
lint.try_lint()
|
||||
end, { desc = "Lint" })
|
||||
6
lua/config/lsp/signs.lua
Normal file
6
lua/config/lsp/signs.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
||||
|
||||
for type, icon in pairs(signs) do
|
||||
local hl = "DiagnosticSign" .. type
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
|
||||
end
|
||||
83
lua/config/lsp/web.lua
Normal file
83
lua/config/lsp/web.lua
Normal file
@@ -0,0 +1,83 @@
|
||||
local ok, mason_lspconfig, mason_tool_installer, lspconfig, conform, lint = pcall(function()
|
||||
return require("mason-lspconfig"),
|
||||
require("mason-tool-installer"),
|
||||
require("lspconfig"),
|
||||
require("conform"),
|
||||
require("lint")
|
||||
end)
|
||||
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
|
||||
mason_lspconfig.setup({
|
||||
ensure_installed = {
|
||||
"tsserver",
|
||||
"html",
|
||||
"emmet_ls",
|
||||
"cssls",
|
||||
},
|
||||
})
|
||||
|
||||
lspconfig.tsserver.setup({
|
||||
capabilities = require("config/lsp/capabilities"),
|
||||
on_attach = require("config/lsp/attach"),
|
||||
})
|
||||
|
||||
lspconfig.html.setup({
|
||||
capabilities = require("config/lsp/capabilities"),
|
||||
on_attach = require("config/lsp/attach"),
|
||||
})
|
||||
|
||||
lspconfig.emmet_ls.setup({
|
||||
capabilities = require("config/lsp/capabilities"),
|
||||
on_attach = require("config/lsp/attach"),
|
||||
})
|
||||
|
||||
lspconfig.cssls.setup({
|
||||
capabilities = require("config/lsp/capabilities"),
|
||||
on_attach = require("config/lsp/attach"),
|
||||
})
|
||||
|
||||
mason_tool_installer.setup({
|
||||
ensure_installed = {
|
||||
"prettierd",
|
||||
"prettier",
|
||||
"eslint_d",
|
||||
},
|
||||
})
|
||||
|
||||
conform.setup({
|
||||
formatters_by_ft = {
|
||||
javascript = { { "prettierd", "prettier" } },
|
||||
json = { { "prettierd", "prettier" } },
|
||||
},
|
||||
format_on_save = {
|
||||
async = false,
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = true,
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set({ "n", "v" }, "<leader>lf", function()
|
||||
conform.format({
|
||||
async = false,
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = true,
|
||||
})
|
||||
end, { desc = "Format" })
|
||||
|
||||
lint.linters_by_ft = {
|
||||
javascript = { "eslint_d" },
|
||||
json = { "eslint_d" },
|
||||
}
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||
callback = function()
|
||||
lint.try_lint()
|
||||
end,
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>ll", function()
|
||||
lint.try_lint()
|
||||
end, { desc = "Lint" })
|
||||
@@ -1,28 +1,28 @@
|
||||
--- Ensure plugin is avaiable
|
||||
local ok, lualine, lazy_status = pcall(function()
|
||||
return require("lualine"), require("lazy.status")
|
||||
return require("lualine"), require("lazy.status")
|
||||
end)
|
||||
if not ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
--- Plugin options
|
||||
opts = {
|
||||
options = {
|
||||
theme = "onedark",
|
||||
},
|
||||
sections = {
|
||||
lualine_x = {
|
||||
{
|
||||
lazy_status.updates,
|
||||
cond = lazy_status.has_updates,
|
||||
color = { fg = "#ff9e64" },
|
||||
},
|
||||
{ "encoding" },
|
||||
{ "fileformat" },
|
||||
{ "filetype" },
|
||||
},
|
||||
},
|
||||
local opts = {
|
||||
options = {
|
||||
theme = "onedark",
|
||||
},
|
||||
sections = {
|
||||
lualine_x = {
|
||||
{
|
||||
lazy_status.updates,
|
||||
cond = lazy_status.has_updates,
|
||||
color = { fg = "#ff9e64" },
|
||||
},
|
||||
{ "encoding" },
|
||||
{ "fileformat" },
|
||||
{ "filetype" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
--- Load plugin
|
||||
|
||||
19
lua/config/mason.lua
Normal file
19
lua/config/mason.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
--- Ensure plugin is installed
|
||||
local ok, mason = pcall(require, "mason")
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
|
||||
--- Plugin options
|
||||
local opts = {
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
--- Load plugin
|
||||
mason.setup(opts)
|
||||
@@ -1,43 +1,43 @@
|
||||
--- Ensure plugins are installed
|
||||
local ok, cmp, luasnip, lspkind = pcall(function()
|
||||
return require("cmp"),
|
||||
require("luasnip"),
|
||||
require("lspkind")
|
||||
return require("cmp"), require("luasnip"), require("lspkind")
|
||||
end)
|
||||
|
||||
if not ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
--- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
opts = {
|
||||
completion = {
|
||||
completeopt = "menu,menuone,preview,noselect",
|
||||
},
|
||||
snippet = { -- configure how nvim-cmp interacts with snippet engine
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
|
||||
["<C-e>"] = cmp.mapping.abort(), -- close completion window
|
||||
["<CR>"] = cmp.mapping.confirm({ select = false }),
|
||||
}),
|
||||
-- sources for autocompletion
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" }, -- snippets
|
||||
{ name = "buffer" }, -- text within current buffer
|
||||
{ name = "path" }, -- file system paths
|
||||
}),
|
||||
-- configure lspkind for vs-code like pictograms in completion menu
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
maxwidth = 50,
|
||||
ellipsis_char = "...",
|
||||
}),
|
||||
},v
|
||||
local opts = {
|
||||
completion = {
|
||||
completeopt = "menu,menuone,preview,noselect",
|
||||
},
|
||||
snippet = { -- configure how nvim-cmp interacts with snippet engine
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
|
||||
["<C-e>"] = cmp.mapping.abort(), -- close completion window
|
||||
["<CR>"] = cmp.mapping.confirm({ select = false }),
|
||||
}),
|
||||
-- sources for autocompletion
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" }, -- snippets
|
||||
{ name = "buffer" }, -- text within current buffer
|
||||
{ name = "path" }, -- file system paths
|
||||
}),
|
||||
-- configure lspkind for vs-code like pictograms in completion menu
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
maxwidth = 50,
|
||||
ellipsis_char = "...",
|
||||
}),
|
||||
},
|
||||
}
|
||||
|
||||
cmp.setup(opts)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--- Ensure plugin is avaiable
|
||||
local ok, nvimtree = pcall(require, "nvim-tree")
|
||||
if not ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
--- Unload netrw
|
||||
@@ -10,29 +10,32 @@ vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
--- Plugin options
|
||||
local opts = {
|
||||
sort = {
|
||||
-- sorter = "case_sensitive",
|
||||
},
|
||||
view = {
|
||||
width = 30,
|
||||
},
|
||||
renderer = {
|
||||
group_empty = true,
|
||||
indent_markers = {
|
||||
enable = true,
|
||||
},
|
||||
icons = {
|
||||
glyphs = {
|
||||
folder = {
|
||||
arrow_closed = "", -- arrow when folder is closed
|
||||
arrow_open = "", -- arrow when folder is open
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
},
|
||||
sort = {
|
||||
-- sorter = "case_sensitive",
|
||||
},
|
||||
view = {
|
||||
width = 30,
|
||||
},
|
||||
renderer = {
|
||||
group_empty = true,
|
||||
indent_markers = {
|
||||
enable = true,
|
||||
},
|
||||
icons = {
|
||||
glyphs = {
|
||||
folder = {
|
||||
arrow_closed = "", -- arrow when folder is closed
|
||||
arrow_open = "", -- arrow when folder is open
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
},
|
||||
}
|
||||
|
||||
--- Load plugin
|
||||
@@ -40,8 +43,8 @@ nvimtree.setup(opts)
|
||||
|
||||
--- Override keymap
|
||||
local km = vim.keymap.set
|
||||
km('n', '<C-e>', ':NvimTreeFocus<cr>')
|
||||
km('n', '<leader>ee', ':NvimTreeToggle<cr>')
|
||||
km('n', '<leader>ef', ':NvimTreeFindFileToggle<cr>')
|
||||
km('n', '<leader>ec', ':NvimTreeCollapse<cr>')
|
||||
km('n', '<leader>er', ':NvimTreeRefresh<cr>')
|
||||
km("n", "<C-e>", ":NvimTreeFocus<cr>")
|
||||
km("n", "<leader>ee", ":NvimTreeToggle<cr>")
|
||||
km("n", "<leader>ef", ":NvimTreeFindFileToggle<cr>")
|
||||
km("n", "<leader>ec", ":NvimTreeCollapse<cr>")
|
||||
km("n", "<leader>er", ":NvimTreeRefresh<cr>")
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
--- Ensure plugin is avaiable
|
||||
local ok, treesitter = pcall(require, "nvim-treesitter.configs")
|
||||
if not ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
--- Plugin options
|
||||
opts = {
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
autotag = {
|
||||
enable = true,
|
||||
},
|
||||
auto_install = true,
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<leader>ss",
|
||||
node_incremental = false,
|
||||
scope_incremental = false,
|
||||
node_decremental = false,
|
||||
},
|
||||
},
|
||||
local opts = {
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
autotag = {
|
||||
enable = true,
|
||||
},
|
||||
auto_install = true,
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<leader>ss",
|
||||
node_incremental = false,
|
||||
scope_incremental = false,
|
||||
node_decremental = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
--- Load plugin
|
||||
|
||||
@@ -19,10 +19,10 @@ vim.g.rainbow_delimiters = {
|
||||
highlight = {
|
||||
'RainbowDelimiterYellow',
|
||||
'RainbowDelimiterBlue',
|
||||
'RainbowDelimiterOrange',
|
||||
'RainbowDelimiterGreen',
|
||||
-- 'RainbowDelimiterGreen',
|
||||
'RainbowDelimiterViolet',
|
||||
'RainbowDelimiterCyan',
|
||||
-- 'RainbowDelimiterCyan',
|
||||
-- 'RainbowDelimiterOrange',
|
||||
'RainbowDelimiterRed',
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,12 +1,33 @@
|
||||
--- Ensute telescope is installed
|
||||
local ok, telescope = pcall(require, "telescope.builtin")
|
||||
local ok, telescope, builtin = pcall(function()
|
||||
return require("telescope"), require("telescope.builtin")
|
||||
end)
|
||||
|
||||
if not ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
--- Pluggin options
|
||||
local opts = {
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown({}),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
--- Load pluggin
|
||||
telescope.setup(opts)
|
||||
telescope.load_extension("ui-select")
|
||||
|
||||
--- Override keymaps
|
||||
opts = {}
|
||||
local km = vim.keymap.set
|
||||
km("n", "<leader>ff", telescope.find_files, {desc = "find files"})
|
||||
km("n", "<leader>fg", telescope.live_grep, {desc = "live grep"})
|
||||
km("n", "<leader>fb", telescope.buffers, {desc = "buffers"})
|
||||
km("n", "<leader>fh", telescope.help_tags, {desc = "help tags"})
|
||||
opts.desc = "find files"
|
||||
km("n", "<leader>ff", builtin.find_files, opts)
|
||||
opts.desc = "live grep"
|
||||
km("n", "<leader>fg", builtin.live_grep, opts)
|
||||
opts.desc = "buffers"
|
||||
km("n", "<leader>fb", builtin.buffers, opts)
|
||||
opts.desc = "help tags"
|
||||
km("n", "<leader>fh", builtin.help_tags, opts)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--- Ensure plugin is avaiable
|
||||
local ok, wichkey = pcall(require, "which-key")
|
||||
if not ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
--- Global options
|
||||
@@ -10,17 +10,29 @@ vim.o.timeoutlen = 300
|
||||
|
||||
--- Add description to leader group
|
||||
wichkey.register({
|
||||
n = {
|
||||
name = "NoHighLight",
|
||||
},
|
||||
e = {
|
||||
name = "NvimTree",
|
||||
},
|
||||
f = {
|
||||
name = "Telescope"
|
||||
},
|
||||
n = {
|
||||
name = "NoHighLight",
|
||||
},
|
||||
e = {
|
||||
name = "NvimTree",
|
||||
},
|
||||
f = {
|
||||
name = "Telescope",
|
||||
},
|
||||
l = {
|
||||
name = "Lsp",
|
||||
},
|
||||
s = {
|
||||
name = "Treesitter",
|
||||
},
|
||||
b = {
|
||||
name = "Bufferline",
|
||||
},
|
||||
t = {
|
||||
name = "Table",
|
||||
},
|
||||
}, { prefix = "<leader>" })
|
||||
|
||||
--- Override keymap
|
||||
local km = vim.keymap.set
|
||||
km('n', '<C-s>', ':WhichKey<cr>', { desc = "Which-key" })
|
||||
km("n", "<C-s>", ":WhichKey<cr>", { desc = "Which-key" })
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
require("core.keymap")
|
||||
require("core.options")
|
||||
|
||||
21
lua/plugins/mason.lua
Normal file
21
lua/plugins/mason.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
return {
|
||||
"williamboman/mason.nvim",
|
||||
dependencies = {
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,4 +1,8 @@
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim', tag = '0.1.5',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.5",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user