fix: update plugins and settings for neovim v0.8.0
This commit is contained in:
parent
9fa4d40199
commit
3d13416869
6 changed files with 61 additions and 55 deletions
|
@ -1,4 +0,0 @@
|
||||||
local setlocal = vim.opt_local
|
|
||||||
|
|
||||||
setlocal.spell = true
|
|
||||||
setlocal.spelllang = "en_gb"
|
|
|
@ -1,4 +0,0 @@
|
||||||
local setlocal = vim.opt_local
|
|
||||||
|
|
||||||
setlocal.spell = true
|
|
||||||
setlocal.spelllang = "en_gb"
|
|
11
neovim/lua/config/tokyonight.lua
Normal file
11
neovim/lua/config/tokyonight.lua
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
local ok, tokyonight = pcall(require, "tokyonight")
|
||||||
|
|
||||||
|
if not ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
tokyonight.setup {
|
||||||
|
style = "night",
|
||||||
|
sidebars = {"packer", "terminal"},
|
||||||
|
dim_inactive = true,
|
||||||
|
}
|
|
@ -1,8 +1,9 @@
|
||||||
local set = vim.opt
|
local set = vim.opt
|
||||||
local g = vim.g
|
local g = vim.g
|
||||||
local cmd = vim.cmd
|
local cmd = vim.cmd
|
||||||
-- TODO: Use vim.fn.stdpath("state") when it is GA.
|
|
||||||
local state_directory = vim.env.XDG_STATE_HOME .. "/nvim"
|
local data_directory = vim.fn.stdpath("data")
|
||||||
|
local state_directory = vim.fn.stdpath("state")
|
||||||
|
|
||||||
g.mapleader = ","
|
g.mapleader = ","
|
||||||
|
|
||||||
|
@ -15,7 +16,7 @@ set.directory = state_directory .. "/swap"
|
||||||
set.undofile = true
|
set.undofile = true
|
||||||
set.undodir = state_directory .. "/undo"
|
set.undodir = state_directory .. "/undo"
|
||||||
set.viewdir = state_directory .. "/view"
|
set.viewdir = state_directory .. "/view"
|
||||||
set.spellfile = vim.fn.stdpath("data") .. "/spell/en.utf-8.add"
|
set.spellfile = data_directory .. "/spell/en.utf-8.add"
|
||||||
|
|
||||||
-- Searching
|
-- Searching
|
||||||
set.ignorecase = true -- ignore case when searching.
|
set.ignorecase = true -- ignore case when searching.
|
||||||
|
@ -37,9 +38,7 @@ set.fileencodings = "utf-8"
|
||||||
-- Colour scheme
|
-- Colour scheme
|
||||||
set.termguicolors = true
|
set.termguicolors = true
|
||||||
set.background = "dark"
|
set.background = "dark"
|
||||||
g.tokyonight_style = "night"
|
cmd "colorscheme tokyonight-night"
|
||||||
g.tokyonight_sidebars = {"packer", "terminal"}
|
|
||||||
cmd "colorscheme tokyonight"
|
|
||||||
|
|
||||||
-- UI and UX
|
-- UI and UX
|
||||||
set.number = true -- enable line numbers
|
set.number = true -- enable line numbers
|
||||||
|
@ -47,7 +46,6 @@ set.relativenumber = true -- enable releative line numbers
|
||||||
set.lazyredraw = true -- do not redraw screen when executing macros, registers, etc that have not been typed
|
set.lazyredraw = true -- do not redraw screen when executing macros, registers, etc that have not been typed
|
||||||
set.splitright = true -- split vertical windows to the right
|
set.splitright = true -- split vertical windows to the right
|
||||||
set.splitbelow = true -- split horizontal windows below
|
set.splitbelow = true -- split horizontal windows below
|
||||||
g.pastetoggle = "<F3>" -- Use <F3> to toggle paste/nopaste
|
|
||||||
set.confirm = true -- raise a dialogue to confirm if you wish to save a file before continuing.
|
set.confirm = true -- raise a dialogue to confirm if you wish to save a file before continuing.
|
||||||
set.cmdheight = 2 -- set the height of the command window to 2 lines.
|
set.cmdheight = 2 -- set the height of the command window to 2 lines.
|
||||||
set.modelines = 5 -- the first 5 lines are checked for modelines.
|
set.modelines = 5 -- the first 5 lines are checked for modelines.
|
||||||
|
@ -68,6 +66,10 @@ g.netrw_keepdir = 0 -- keep the browsing directory the same as the current
|
||||||
-- Configure Omnifunc to use the LSP client
|
-- Configure Omnifunc to use the LSP client
|
||||||
set.omnifunc = "v:lua.vim.lsp.omnifunc"
|
set.omnifunc = "v:lua.vim.lsp.omnifunc"
|
||||||
|
|
||||||
|
-- Spelling
|
||||||
|
set.spell = true
|
||||||
|
set.spelllang = "en_gb"
|
||||||
|
|
||||||
-- The Statusline
|
-- The Statusline
|
||||||
local statusline = require("statusline")
|
local statusline = require("statusline")
|
||||||
set.statusline = statusline.output()
|
set.statusline = statusline.output()
|
||||||
|
|
|
@ -2,35 +2,36 @@ return require("packer").startup(function(use)
|
||||||
-- Packer can manage itself
|
-- Packer can manage itself
|
||||||
use {
|
use {
|
||||||
"wbthomason/packer.nvim",
|
"wbthomason/packer.nvim",
|
||||||
commit = "213ed031490ab5318e7996a594b52131e5c1c06f", -- 2022-07-30
|
commit = "6afb67460283f0e990d35d229fd38fdc04063e0a", -- 2022-09-10
|
||||||
}
|
}
|
||||||
|
|
||||||
use {
|
use {
|
||||||
"folke/tokyonight.nvim",
|
"folke/tokyonight.nvim",
|
||||||
commit = "8223c970677e4d88c9b6b6d81bda23daf11062bb", -- 2021-12-31
|
commit = "fd9105c9487996aa2269992b72a6fea7504688e4", -- 2022-10-05
|
||||||
|
config = require("config.tokyonight"),
|
||||||
}
|
}
|
||||||
|
|
||||||
use {
|
use {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
commit = "60f2993b9661d9844cee3bebdbd1b5860577eb3c", -- 2022-07-29
|
commit = "1c2a57d991548995030748088a7ded73a7b5f496", -- 2022-10-06
|
||||||
config = require("config.lsp"),
|
config = require("config.lsp"),
|
||||||
}
|
}
|
||||||
|
|
||||||
use {
|
use {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
commit = "18ad3904fbf7f1a11140c97e45432d57e63b40eb", -- 2022-07-30
|
commit = "a33858d399d0da226b0cf7b45fe9dc8f0a06547b", -- 2022-10-06
|
||||||
config = require("config.treesitter"),
|
config = require("config.treesitter"),
|
||||||
run = ":TSUpdate",
|
run = ":TSUpdate",
|
||||||
}
|
}
|
||||||
|
|
||||||
use {
|
use {
|
||||||
"kyazdani42/nvim-web-devicons",
|
"kyazdani42/nvim-web-devicons",
|
||||||
commit = "2d02a56189e2bde11edd4712fea16f08a6656944", -- 2022-07-05
|
commit = "a8cf88cbdb5c58e2b658e179c4b2aa997479b3da", -- 2022-10-03
|
||||||
}
|
}
|
||||||
|
|
||||||
use {
|
use {
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
tag = "v2.4.0", -- 2022.07.10
|
tag = "v2.12.0", -- 2022.10.03
|
||||||
requires = "kyazdani42/nvim-web-devicons",
|
requires = "kyazdani42/nvim-web-devicons",
|
||||||
config = require("config.bufferline"),
|
config = require("config.bufferline"),
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ local theme = require("statusline.themes.tokyonight")
|
||||||
local ns = vim.api.nvim_create_namespace("statusline")
|
local ns = vim.api.nvim_create_namespace("statusline")
|
||||||
|
|
||||||
function M.output()
|
function M.output()
|
||||||
vim.api.nvim__set_hl_ns(ns)
|
vim.api.nvim_set_hl_ns(ns)
|
||||||
|
|
||||||
for name, settings in pairs(theme.theme) do
|
for name, settings in pairs(theme.theme) do
|
||||||
vim.api.nvim_set_hl(ns, name, settings)
|
vim.api.nvim_set_hl(ns, name, settings)
|
||||||
|
|
Loading…
Reference in a new issue