mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Compare commits
3 Commits
e462ebcbcc
...
69d8543495
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
69d8543495 | ||
|
|
be3d134c37 | ||
|
|
601396f700 |
6
init.lua
6
init.lua
@ -14,11 +14,13 @@ vim.loader.enable()
|
|||||||
local version = vim.version
|
local version = vim.version
|
||||||
|
|
||||||
-- check if we have the latest stable version of nvim
|
-- check if we have the latest stable version of nvim
|
||||||
local expected_ver = "0.9.5"
|
local expected_ver = "0.10.0"
|
||||||
local ev = version.parse(expected_ver)
|
local ev = version.parse(expected_ver)
|
||||||
local actual_ver = version()
|
local actual_ver = version()
|
||||||
|
|
||||||
if version.cmp(ev, actual_ver) ~= 0 then
|
local result = version.cmp(ev, {actual_ver.major, actual_ver.minor, actual_ver.patch})
|
||||||
|
|
||||||
|
if result ~= 0 then
|
||||||
local _ver = string.format("%s.%s.%s", actual_ver.major, actual_ver.minor, actual_ver.patch)
|
local _ver = string.format("%s.%s.%s", actual_ver.major, actual_ver.minor, actual_ver.patch)
|
||||||
local msg = string.format("Expect nvim %s, but got %s instead. Use at your own risk!", expected_ver, _ver)
|
local msg = string.format("Expect nvim %s, but got %s instead. Use at your own risk!", expected_ver, _ver)
|
||||||
vim.api.nvim_err_writeln(msg)
|
vim.api.nvim_err_writeln(msg)
|
||||||
|
|||||||
@ -234,7 +234,7 @@ if utils.executable("lua-language-server") then
|
|||||||
-- see also https://github.com/LuaLS/lua-language-server/wiki/Libraries#link-to-workspace .
|
-- see also https://github.com/LuaLS/lua-language-server/wiki/Libraries#link-to-workspace .
|
||||||
-- Lua-dev.nvim also has similar settings for lua ls, https://github.com/folke/neodev.nvim/blob/main/lua/neodev/luals.lua .
|
-- Lua-dev.nvim also has similar settings for lua ls, https://github.com/folke/neodev.nvim/blob/main/lua/neodev/luals.lua .
|
||||||
library = {
|
library = {
|
||||||
fn.stdpath("data") .. "/lazy/emmylua-nvim",
|
vim.env.VIMRUNTIME,
|
||||||
fn.stdpath("config"),
|
fn.stdpath("config"),
|
||||||
},
|
},
|
||||||
maxPreload = 2000,
|
maxPreload = 2000,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
local keymap = vim.keymap
|
local keymap = vim.keymap
|
||||||
local api = vim.api
|
local api = vim.api
|
||||||
local uv = vim.loop
|
local uv = vim.uv
|
||||||
|
|
||||||
-- Save key strokes (now we do not need to press shift to enter command mode).
|
-- Save key strokes (now we do not need to press shift to enter command mode).
|
||||||
keymap.set({ "n", "x" }, ";", ":")
|
keymap.set({ "n", "x" }, ";", ":")
|
||||||
|
|||||||
@ -2,7 +2,7 @@ local utils = require("utils")
|
|||||||
|
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.uv.fs_stat(lazypath) then
|
||||||
vim.fn.system {
|
vim.fn.system {
|
||||||
"git",
|
"git",
|
||||||
"clone",
|
"clone",
|
||||||
@ -480,7 +480,6 @@ local plugin_specs = {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "ii14/emmylua-nvim", ft = "lua" },
|
|
||||||
{
|
{
|
||||||
"j-hui/fidget.nvim",
|
"j-hui/fidget.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user