-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* perf: configs * test: packer.nvim * test: packer.nvim * fix: packer.nvim * lint: typecheck * doc: fix packer.nvim
- Loading branch information
1 parent
b6a7857
commit a05793a
Showing
5 changed files
with
94 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- @class Object | ||
--- @field __class string | ||
|
||
local Object = { | ||
__class = "object", | ||
} | ||
|
||
--- @param classname string? | ||
function Object:new(classname) | ||
return vim.tbl_deep_extend("force", vim.deepcopy(Object), { | ||
__class = classname or "object", | ||
}) | ||
end | ||
|
||
--- @param o any? | ||
--- @return boolean | ||
function Object:instanceof(o) | ||
return type(o) == "table" and o.__class == self.__class | ||
end | ||
|
||
local M = { | ||
Object = Object, | ||
} | ||
|
||
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
vim.o.number = true | ||
vim.o.autoread = true | ||
vim.o.autowrite = true | ||
vim.o.swapfile = false | ||
vim.o.confirm = true | ||
vim.o.termguicolors = true | ||
|
||
local ensure_packer = function() | ||
local fn = vim.fn | ||
local install_path = fn.stdpath("data") | ||
.. "/site/pack/packer/start/packer.nvim" | ||
if fn.empty(fn.glob(install_path)) > 0 then | ||
fn.system({ | ||
"git", | ||
"clone", | ||
"--depth", | ||
"1", | ||
"https://github.com/wbthomason/packer.nvim", | ||
install_path, | ||
}) | ||
vim.cmd([[packadd packer.nvim]]) | ||
return true | ||
end | ||
return false | ||
end | ||
|
||
local packer_bootstrap = ensure_packer() | ||
|
||
require("packer").startup(function(use) | ||
use("wbthomason/packer.nvim") | ||
use("folke/tokyonight.nvim") | ||
use("nvim-tree/nvim-web-devicons") | ||
use({ "junegunn/fzf", run = ":call fzf#install()" }) | ||
use({ | ||
vim.fn.expand("~/github/linrongbin16/fzfx.nvim"), | ||
config = function() | ||
require("fzfx").setup({ | ||
debug = { enable = true, file_log = true }, | ||
}) | ||
end, | ||
}) | ||
|
||
if packer_bootstrap then | ||
require("packer").sync() | ||
end | ||
end) | ||
|
||
vim.cmd([[ | ||
colorscheme tokyonight | ||
]]) |