update nvim config
This commit is contained in:
parent
965b392ace
commit
fd6fa59a6e
|
@ -18,3 +18,7 @@ vim.keymap.set("x", "<leader>p", '"_dP')
|
||||||
-- next greatest remap ever : asbjornHaland
|
-- next greatest remap ever : asbjornHaland
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>y", '"+y')
|
vim.keymap.set({ "n", "v" }, "<leader>y", '"+y')
|
||||||
vim.keymap.set("n", "<leader>Y", '"+Y')
|
vim.keymap.set("n", "<leader>Y", '"+Y')
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>pv", ":Vex<CR>")
|
||||||
|
vim.keymap.set("t", "<Esc>", "<C-\\><C-n>")
|
||||||
|
vim.keymap.set("t", "<C-v><Esc>", "<Esc>")
|
||||||
|
|
|
@ -2,36 +2,20 @@ local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
-- bootstrap lazy.nvim
|
-- bootstrap lazy.nvim
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable",
|
||||||
|
lazypath })
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||||
|
|
||||||
local _border = "single"
|
|
||||||
|
|
||||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
|
|
||||||
border = _border,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
|
|
||||||
border = _border,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.diagnostic.config({
|
|
||||||
float = { border = _border },
|
|
||||||
})
|
|
||||||
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
-- import any extras modules here
|
-- import any extras modules here
|
||||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
|
||||||
{ import = "lazyvim.plugins.extras.util.project" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.tailwind" },
|
{ import = "lazyvim.plugins.extras.lang.tailwind" },
|
||||||
{ import = "lazyvim.plugins.extras.dap.core" },
|
{ import = "lazyvim.plugins.extras.linting.eslint" },
|
||||||
|
-- { import = "lazyvim.plugins.extras.dap.core" },
|
||||||
-- { import = "lazyvim.plugins.extras.dap.nlua" },
|
-- { import = "lazyvim.plugins.extras.dap.nlua" },
|
||||||
-- { import = "lazyvim.plugins.extras.formatting.prettier" },
|
|
||||||
-- { import = "lazyvim.plugins.extras.linting.eslint" },
|
|
||||||
-- import/override with your plugins
|
-- import/override with your plugins
|
||||||
{ import = "plugins" },
|
{ import = "plugins" },
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,10 +1,17 @@
|
||||||
-- Options are automatically loaded before lazy.nvim startup
|
-- Options are automatically loaded before lazy.nvim startup
|
||||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||||
-- Add any additional options here
|
-- Add any additional options here
|
||||||
vim.g.loaded_netrw = 1
|
|
||||||
vim.g.loaded_netrwPlugin = 1
|
vim.g.netrw_banner = 0
|
||||||
vim.o.mouse = ""
|
vim.g.netrw_browse_split = 0
|
||||||
vim.o.nu = true
|
vim.g.netrw_winsize = 25
|
||||||
vim.o.guicursor = ""
|
|
||||||
vim.o.cursorline = false
|
local opt = vim.opt;
|
||||||
vim.o.clipboard = ""
|
|
||||||
|
opt.mouse = ""
|
||||||
|
opt.nu = true
|
||||||
|
opt.guicursor = ""
|
||||||
|
opt.cursorline = false
|
||||||
|
opt.clipboard = ""
|
||||||
|
opt.scrolloff = 8
|
||||||
|
opt.conceallevel = 0
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
return {
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
dependencies = { "hrsh7th/cmp-emoji" },
|
|
||||||
---@param opts cmp.ConfigSchema
|
|
||||||
opts = function(_, opts)
|
|
||||||
local cmp = require("cmp")
|
|
||||||
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "emoji" } }))
|
|
||||||
cmp.setup({
|
|
||||||
window = {
|
|
||||||
completion = {
|
|
||||||
border = "single",
|
|
||||||
-- winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,CursorLine:PmenuThumb,Search:None",
|
|
||||||
},
|
|
||||||
documentation = {
|
|
||||||
border = "single",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"rose-pine/neovim",
|
||||||
|
name = "rose-pine",
|
||||||
|
opts = {
|
||||||
|
variant = "moon",
|
||||||
|
dark_variant = "moon",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"LazyVim/LazyVim",
|
||||||
|
opts = {
|
||||||
|
colorscheme = "rose-pine",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -1,9 +1,18 @@
|
||||||
return {
|
return {
|
||||||
{ "rcarriga/nvim-notify", enabled = false },
|
{ "rcarriga/nvim-notify", enabled = false },
|
||||||
{ "folke/todo-comments.nvim", enabled = false },
|
{ "folke/todo-comments.nvim", enabled = false },
|
||||||
-- this one is the command line popup
|
-- this one is the command line popup
|
||||||
{ "folke/noice.nvim", enabled = false },
|
{ "folke/noice.nvim", enabled = false },
|
||||||
{ "indent-blankline.nvim", enabled = false },
|
{ "indent-blankline.nvim", enabled = false },
|
||||||
{ "mini.indentscope", enabled = false },
|
{ "mini.indentscope", enabled = false },
|
||||||
{ "RRethy/vim-illuminate", enabled = false },
|
{ "RRethy/vim-illuminate", enabled = false },
|
||||||
|
{ "neodev.nvim", enabled = false },
|
||||||
|
{ "neo-tree.nvim", enabled = false },
|
||||||
|
{ "bufferline.nvim", enabled = false },
|
||||||
|
{ "dashboard-nvim", enabled = false },
|
||||||
|
{ "flash.nvim", enabled = false },
|
||||||
|
{ "mini.pairs", enabled = false },
|
||||||
|
{ "mini.ai", enabled = false },
|
||||||
|
{ "nvim-ts-autotag", enabled = false },
|
||||||
|
{ "conform.nvim", enabled = false },
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
-- other settings removed for brevity
|
|
||||||
opts = {
|
|
||||||
---@type lspconfig.options
|
|
||||||
servers = {
|
|
||||||
eslint = {
|
|
||||||
settings = {
|
|
||||||
-- helps eslint find the eslintrc when it's placed in a subfolder instead of the cwd root
|
|
||||||
workingDirectory = { mode = "auto" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
setup = {
|
|
||||||
eslint = function()
|
|
||||||
require("lazyvim.util").on_attach(function(client)
|
|
||||||
if client.name == "eslint" then
|
|
||||||
client.server_capabilities.documentFormattingProvider = true
|
|
||||||
elseif client.name == "tsserver" then
|
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end,
|
|
||||||
-- eslint = function()
|
|
||||||
-- vim.api.nvim_create_autocmd("BufWritePre", {
|
|
||||||
-- callback = function(event)
|
|
||||||
-- local client = vim.lsp.get_active_clients({ bufnr = event.buf, name = "eslint" })[1]
|
|
||||||
-- if client then
|
|
||||||
-- local diag = vim.diagnostic.get(event.buf, { namespace = vim.lsp.diagnostic.get_namespace(client.id) })
|
|
||||||
-- if #diag > 0 then
|
|
||||||
-- vim.cmd("EslintFixAll")
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
-- end,
|
|
||||||
-- })
|
|
||||||
-- end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -103,7 +103,7 @@ return {
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"jose-elias-alvarez/typescript.nvim",
|
"jose-elias-alvarez/typescript.nvim",
|
||||||
init = function()
|
init = function()
|
||||||
require("lazyvim.util").on_attach(function(_, buffer)
|
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||||
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
-- dashboard
|
|
||||||
return {
|
|
||||||
"goolord/alpha-nvim",
|
|
||||||
event = "VimEnter",
|
|
||||||
opts = function()
|
|
||||||
local dashboard = require("alpha.themes.dashboard")
|
|
||||||
local logo = [[
|
|
||||||
██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z
|
|
||||||
██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z
|
|
||||||
██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z
|
|
||||||
██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z
|
|
||||||
███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║
|
|
||||||
╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
|
|
||||||
|
|
||||||
[@ymoruhyi]
|
|
||||||
]]
|
|
||||||
|
|
||||||
dashboard.section.header.val = vim.split(logo, "\n")
|
|
||||||
end,
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"williamboman/mason.nvim",
|
|
||||||
opts = function(_, opts)
|
|
||||||
table.insert(opts.ensure_installed, "svelte-language-server")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
opts = {
|
|
||||||
servers = {
|
|
||||||
svelte = {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"evanleck/vim-svelte",
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"rose-pine/neovim",
|
|
||||||
name = "rose-pine",
|
|
||||||
opts = {
|
|
||||||
variant = "moon",
|
|
||||||
dark_variant = "moon",
|
|
||||||
-- highlight_groups = {
|
|
||||||
-- Normal = { bg = "none" },
|
|
||||||
-- NormalFloat = { bg = "none" },
|
|
||||||
-- TelescopeBorder = { fg = "highlight_high", bg = "none" },
|
|
||||||
-- TelescopeNormal = { bg = "none" },
|
|
||||||
-- TelescopePromptNormal = { bg = "base" },
|
|
||||||
-- TelescopeResultsNormal = { fg = "subtle", bg = "none" },
|
|
||||||
-- TelescopeSelection = { fg = "text", bg = "base" },
|
|
||||||
-- TelescopeSelectionCaret = { fg = "rose", bg = "rose" },
|
|
||||||
-- },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"LazyVim/LazyVim",
|
|
||||||
opts = {
|
|
||||||
colorscheme = "rose-pine",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
Loading…
Reference in New Issue