...
This commit is contained in:
parent
50a89054a8
commit
e93f9c7196
5 changed files with 97 additions and 71 deletions
|
@ -7,30 +7,20 @@ for name, _ in pairs(package.loaded) do
|
|||
package.loaded[name] = nil
|
||||
end
|
||||
|
||||
vim.cmd.language("en_US")
|
||||
vim.opt.tildeop = true
|
||||
vim.opt.swapfile = false
|
||||
|
||||
vim.o.number = true
|
||||
vim.o.cursorline = true
|
||||
vim.o.guicursor = 'n-v-c-sm-i-ci-ve:block,r-cr-o:hor20,a:blinkoff700-blinkoff400-blinkoff250-Cursor/lCursor'
|
||||
vim.opt.listchars = {
|
||||
tab = '|-',
|
||||
trail = '.',
|
||||
lead = '.',
|
||||
}
|
||||
vim.opt.list = true
|
||||
|
||||
require("general")
|
||||
require("indent")
|
||||
require("maps")
|
||||
require("filetypes")
|
||||
|
||||
local hls = require("color.night").hls
|
||||
require("color").apply_hls((hls))
|
||||
local color = require("color")
|
||||
|
||||
local night = require("color.night")
|
||||
color.apply_hls(night.hls)
|
||||
|
||||
--require'lspconfig'.gopls.setup{}
|
||||
|
||||
require("bootstrap")
|
||||
require("dep") {
|
||||
}
|
||||
--require("bootstrap")
|
||||
--require("dep") {
|
||||
--}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
-- Installing the dep package manager
|
||||
local path = vim.fn.stdpath("data") .. "/site/pack/deps/opt/dep"
|
||||
--local path = vim.fn.stdpath("data") .. "/site/pack/deps/opt/dep"
|
||||
|
||||
if vim.fn.empty(vim.fn.glob(path)) > 0 then
|
||||
vim.fn.system({ "git", "clone", "--depth=1", "https://github.com/chiyadev/dep", path })
|
||||
end
|
||||
-- if vim.fn.empty(vim.fn.glob(path)) > 0 then
|
||||
-- vim.fn.system({ "git", "clone", "--depth=1", "https://github.com/chiyadev/dep", path })
|
||||
-- end
|
||||
|
||||
vim.cmd("packadd dep")
|
||||
-- vim.cmd("packadd dep")
|
||||
|
||||
|
|
|
@ -4,3 +4,49 @@ vim.filetype.add({
|
|||
pmd = "markdown",
|
||||
},
|
||||
})
|
||||
|
||||
createAutoCmd = vim.api.nvim_create_autocmd
|
||||
--
|
||||
-- Basic thing for compiling languages.
|
||||
createAutoCmd({
|
||||
"BufNewFile",
|
||||
"BufRead",
|
||||
},{
|
||||
pattern = "*.tengo,*.go,*.c,*.cc,*.C,*.cpp,*.rs,*.lua,*.sql,*.tengo,*.xgo",
|
||||
callback = function()
|
||||
local buf = vim.bo[vim.api.nvim_get_current_buf()]
|
||||
vim.o.expandtab = false
|
||||
vim.o.tabstop = 4
|
||||
vim.o.shiftwidth = 4
|
||||
end,
|
||||
})
|
||||
|
||||
createAutoCmd({
|
||||
"BufNewFile",
|
||||
"BufRead",
|
||||
},{
|
||||
pattern = "*.md,*.pmd,*.txt,*.js,*.jsx,*.scss"..
|
||||
",*.css,*.sass,*.htm,*.html,*.htmlx,*.tmpl"..
|
||||
",*.tpl,*.yml,*.yaml,*.toml,*.tml",
|
||||
callback = function()
|
||||
local buf = vim.bo[vim.api.nvim_get_current_buf()]
|
||||
buf.expandtab = true
|
||||
buf.shiftwidth=2
|
||||
buf.tabstop=2
|
||||
buf.softtabstop = 0
|
||||
end,
|
||||
})
|
||||
|
||||
createAutoCmd({
|
||||
"BufNewFile",
|
||||
"BufRead",
|
||||
},{
|
||||
pattern = "*.py",
|
||||
callback = function()
|
||||
local buf = vim.bo[vim.api.nvim_get_current_buf()]
|
||||
buf.expandtab = true
|
||||
buf.shiftwidth=4
|
||||
buf.tabstop=4
|
||||
buf.softtabstop = 0
|
||||
end,
|
||||
})
|
||||
|
|
36
nvim/lua/general.lua
Normal file
36
nvim/lua/general.lua
Normal file
|
@ -0,0 +1,36 @@
|
|||
vim.cmd("syntax off")
|
||||
|
||||
-- The standard.
|
||||
vim.cmd.language("en_US")
|
||||
|
||||
-- Fucking hate swapfiles.
|
||||
vim.opt.swapfile = false
|
||||
|
||||
-- Show line number.
|
||||
vim.o.number = true
|
||||
--
|
||||
vim.o.cursorline = true
|
||||
|
||||
-- For quick changing of character case.
|
||||
vim.opt.tildeop = true
|
||||
|
||||
-- Cursor stuff.
|
||||
vim.o.guicursor = 'n-v-c-sm-i-ci-ve:block,r-cr-o:hor20,a:blinkoff700-blinkoff400-blinkoff250-Cursor/lCursor'
|
||||
|
||||
-- To see more.
|
||||
vim.opt.listchars = {
|
||||
tab = '|-',
|
||||
trail = '.',
|
||||
lead = '.',
|
||||
}
|
||||
|
||||
-- Should recall later.
|
||||
vim.opt.list = true
|
||||
|
||||
-- Golang, C based configuration
|
||||
vim.o.expandtab = false
|
||||
vim.o.autoindent = true
|
||||
vim.o.foldmethod = 'indent'
|
||||
vim.o.tabstop = 4
|
||||
vim.o.shiftwidth = 4
|
||||
|
|
@ -1,51 +1,5 @@
|
|||
|
||||
-- Golang, C based configuration
|
||||
vim.o.autoindent = true
|
||||
vim.o.foldmethod = 'indent'
|
||||
|
||||
createAutoCmd = vim.api.nvim_create_autocmd
|
||||
|
||||
-- Basic thing for compiling languages.
|
||||
createAutoCmd({
|
||||
"BufNewFile",
|
||||
"BufRead",
|
||||
},{
|
||||
pattern = "*.go,*.c,*.cc,*.C,*.cpp,*.rs,*.lua,*.sql",
|
||||
callback = function()
|
||||
local buf = vim.bo[vim.api.nvim_get_current_buf()]
|
||||
vim.o.expandtab = false
|
||||
vim.o.tabstop = 4
|
||||
vim.o.shiftwidth = 4
|
||||
end,
|
||||
})
|
||||
|
||||
createAutoCmd({
|
||||
"BufNewFile",
|
||||
"BufRead",
|
||||
},{
|
||||
pattern = "*.md,*.pmd,*.txt,*.js,*.jsx,*.scss,*.css,*.sass,*.htm,*.html,*.htmlx,*.tmpl,*.tpl,*.yml,*.yaml,*.toml,*.tml",
|
||||
callback = function()
|
||||
local buf = vim.bo[vim.api.nvim_get_current_buf()]
|
||||
buf.expandtab = true
|
||||
buf.shiftwidth=2
|
||||
buf.tabstop=2
|
||||
buf.softtabstop = 0
|
||||
end,
|
||||
})
|
||||
|
||||
createAutoCmd({
|
||||
"BufNewFile",
|
||||
"BufRead",
|
||||
},{
|
||||
pattern = "*.py",
|
||||
callback = function()
|
||||
local buf = vim.bo[vim.api.nvim_get_current_buf()]
|
||||
buf.expandtab = true
|
||||
buf.shiftwidth=4
|
||||
buf.tabstop=4
|
||||
buf.softtabstop = 0
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue