nvim
This commit is contained in:
parent
0f6fc5bd2f
commit
a762350f38
4 changed files with 56 additions and 60 deletions
|
@ -73,6 +73,10 @@ local on_attach = function(client, bufnr)
|
|||
end
|
||||
|
||||
local function prettier_command()
|
||||
if not root_dir then
|
||||
return "prettier"
|
||||
end
|
||||
|
||||
if vim.fs.basename(root_dir .. "node_modules/prettier") then
|
||||
return "npx prettier"
|
||||
else
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
--[[
|
||||
|
||||
Neovim Configuration
|
||||
Configuration Home: https://github.com/esprssoo/dotfiles
|
||||
|
||||
--]]
|
||||
|
||||
|
@ -16,7 +15,6 @@ vim.g.loaded_netrwPlugin = 1
|
|||
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if vim.fn.empty(vim.fn.glob(lazypath)) == 1 then
|
||||
print("installing lazy")
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
|
@ -27,9 +25,59 @@ if vim.fn.empty(vim.fn.glob(lazypath)) == 1 then
|
|||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
require("lazy").setup("my.plugins")
|
||||
require("lazy").setup("plugins")
|
||||
|
||||
vim.opt.background = "dark"
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
vim.opt.colorcolumn = { 100 }
|
||||
vim.opt.completeopt = "menu,menuone,noselect"
|
||||
vim.opt.conceallevel = 2
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
vim.opt.foldlevelstart = 99
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.hidden = true
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.inccommand = "split"
|
||||
vim.opt.langmap =
|
||||
"ΑA,ΒB,ΨC,ΔD,ΕE,ΦF,ΓG,ΗH,ΙI,ΞJ,ΚK,ΛL,ΜM,ΝN,ΟO,ΠP,QQ,ΡR,ΣS,ΤT,ΘU,ΩV,WW,ΧX,ΥY,ΖZ,αa,βb,ψc,δd,εe,φf,γg,ηh,ιi,ξj,κk,λl,μm,νn,οo,πp,qq,ρr,σs,τt,θu,ωv,ςw,χx,υy,ζz"
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars = {
|
||||
tab = "→ ",
|
||||
trail = "·",
|
||||
extends = "❯",
|
||||
precedes = "❮",
|
||||
}
|
||||
vim.opt.number = true
|
||||
vim.opt.path = ".,,**"
|
||||
vim.opt.pumblend = 30
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.scrolloff = 6
|
||||
vim.opt.selectmode = "mouse"
|
||||
vim.opt.showbreak = "↪"
|
||||
vim.opt.showmode = false
|
||||
vim.opt.signcolumn = "yes"
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.splitright = true
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.title = true
|
||||
vim.opt.undodir = vim.fn.stdpath "cache" .. "/undo"
|
||||
vim.opt.undofile = true
|
||||
vim.opt.updatetime = 750
|
||||
vim.opt.wildignore = {
|
||||
"**/node_modules/**",
|
||||
"**/.git/**",
|
||||
}
|
||||
vim.opt.wrap = false
|
||||
-- Indent Behavior
|
||||
vim.opt.autoindent = true
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.shiftround = true
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.tabstop = 4
|
||||
|
||||
require "my.options"
|
||||
require "my.keymaps"
|
||||
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
local options = {
|
||||
background = "dark",
|
||||
clipboard = "unnamedplus",
|
||||
colorcolumn = { 100 },
|
||||
completeopt = "menu,menuone,noselect",
|
||||
conceallevel = 2,
|
||||
cursorline = true,
|
||||
foldexpr = "nvim_treesitter#foldexpr()",
|
||||
foldlevelstart = 99,
|
||||
foldmethod = "expr",
|
||||
hidden = true,
|
||||
ignorecase = true,
|
||||
inccommand = "split",
|
||||
langmap =
|
||||
"ΑA,ΒB,ΨC,ΔD,ΕE,ΦF,ΓG,ΗH,ΙI,ΞJ,ΚK,ΛL,ΜM,ΝN,ΟO,ΠP,QQ,ΡR,ΣS,ΤT,ΘU,ΩV,WW,ΧX,ΥY,ΖZ,αa,βb,ψc,δd,εe,φf,γg,ηh,ιi,ξj,κk,λl,μm,νn,οo,πp,qq,ρr,σs,τt,θu,ωv,ςw,χx,υy,ζz",
|
||||
list = true,
|
||||
listchars = {
|
||||
tab = "→ ",
|
||||
trail = "·",
|
||||
extends = "❯",
|
||||
precedes = "❮",
|
||||
},
|
||||
number = true,
|
||||
path = ".,,**",
|
||||
pumblend = 30,
|
||||
relativenumber = true,
|
||||
scrolloff = 6,
|
||||
selectmode = "mouse",
|
||||
showbreak = "↪",
|
||||
showmode = false,
|
||||
signcolumn = "yes",
|
||||
smartcase = true,
|
||||
splitright = true,
|
||||
swapfile = false,
|
||||
termguicolors = true,
|
||||
title = true,
|
||||
undodir = vim.fn.stdpath "cache" .. "/undo",
|
||||
undofile = true,
|
||||
updatetime = 750,
|
||||
wildignore = {
|
||||
"**/node_modules/**",
|
||||
"**/.git/**",
|
||||
},
|
||||
wrap = false,
|
||||
-- Indent Behavior
|
||||
autoindent = true,
|
||||
expandtab = true,
|
||||
shiftround = true,
|
||||
shiftwidth = 4,
|
||||
softtabstop = 4,
|
||||
tabstop = 4,
|
||||
}
|
||||
|
||||
for k, v in pairs(options) do
|
||||
vim.opt[k] = v
|
||||
end
|
Loading…
Reference in a new issue