Update neovim
This commit is contained in:
+57
-5
@@ -1,12 +1,15 @@
|
||||
vim.opt.termguicolors = true
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", "https://github.com/folke/lazy.nvim.git", lazypath })
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable",
|
||||
"https://github.com/folke/lazy.nvim.git", lazypath })
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
{ "folke/tokyonight.nvim", lazy = false,
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {},
|
||||
},
|
||||
@@ -16,13 +19,18 @@ require("lazy").setup({
|
||||
{ "nvim-mini/mini.surround", version = '*' },
|
||||
{ "ibhagwan/fzf-lua", dependencies = { "nvim-tree/nvim-web-devicons" } },
|
||||
{ "saghen/blink.cmp", version = "v1.*", opts = {} },
|
||||
{ dir = "/Users/andrew/personal/Projects/Lua/polydev/",
|
||||
{
|
||||
dir = "/Users/andrew/personal/Projects/Lua/polydev/",
|
||||
opts = {
|
||||
terminal = {
|
||||
mode = "split",
|
||||
}
|
||||
} },
|
||||
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", branch = "master",
|
||||
}
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
branch = "master",
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
highlight = { enable = true },
|
||||
@@ -30,6 +38,38 @@ require("lazy").setup({
|
||||
})
|
||||
end
|
||||
},
|
||||
-- {
|
||||
-- "mfussenegger/nvim-lint",
|
||||
-- event = {
|
||||
-- "BufReadPre",
|
||||
-- "BufNewFile",
|
||||
-- },
|
||||
-- config = function()
|
||||
-- local lint = require("lint")
|
||||
--
|
||||
-- lint.linters_by_ft = {
|
||||
-- c = { "clangtidy" },
|
||||
-- }
|
||||
--
|
||||
-- local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
|
||||
--
|
||||
-- vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||
-- group = lint_augroup,
|
||||
-- callback = function()
|
||||
-- lint.try_lint()
|
||||
-- end,
|
||||
-- })
|
||||
--
|
||||
-- vim.keymap.set("n", "<leader>l", function()
|
||||
-- lint.try_lint()
|
||||
-- end, { desc = "Trigger linting for current file" })
|
||||
-- -- Customizing the linter arguments
|
||||
-- local clangtidy = lint.linters.clangtidy
|
||||
-- clangtidy.args = {
|
||||
-- "-p", "build", -- Tell clang-tidy to look in the build folder for compile_commands.json
|
||||
-- }
|
||||
-- end,
|
||||
-- }
|
||||
}
|
||||
})
|
||||
|
||||
@@ -73,6 +113,7 @@ vim.opt.relativenumber = true
|
||||
vim.opt.wrap = false
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.signcolumn = "yes"
|
||||
vim.opt.undofile = true -- Keeps undo history even after we close a file
|
||||
vim.opt.scrolloff = 8
|
||||
vim.opt.sidescrolloff = 8
|
||||
vim.opt.hlsearch = false
|
||||
@@ -80,6 +121,16 @@ vim.opt.completeopt = { "menuone", "noselect", "popup" }
|
||||
vim.g.netrw_browse_split = 0
|
||||
vim.g.netrw_banner = 0
|
||||
vim.g.netrw_winsize = 25
|
||||
vim.opt.wrapscan = true -- begin search from top of the file when nothng is found
|
||||
vim.opt.cursorline = true -- enable cursorline
|
||||
vim.opt.cursorlineopt = { "screenline", "number" } -- cursorline look
|
||||
vim.opt.shortmess =
|
||||
'aF' -- abbreviates messages and prevents file name being echoed when opened
|
||||
vim.opt.ignorecase = true -- ignore cases when searching
|
||||
vim.opt.smartcase = true -- However if we use a capital in search string we then consider case-sensitivity, ignorecase is disabled
|
||||
vim.opt.smartindent = true -- smarter indentation
|
||||
vim.opt.smarttab = true -- make tab behaviour smarter
|
||||
vim.opt.laststatus = 3
|
||||
vim.cmd.colorscheme("tokyonight-moon")
|
||||
vim.lsp.enable({ "lua_ls", "clangd" })
|
||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||
@@ -93,6 +144,7 @@ vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||
vim.keymap.set("n", "<leader>ff", vim.lsp.buf.format)
|
||||
vim.keymap.set("n", "<leader>vs", ":vsplit<CR>")
|
||||
vim.keymap.set("n", "<leader>ss", ":split<CR>")
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||
vim.keymap.set("x", "<leader>p", [["_dP]])
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"struct": {
|
||||
"prefix": "struct",
|
||||
"body": [
|
||||
"struct ${1:foo} {",
|
||||
" ${2:pass}",
|
||||
"};"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
column_width = 80
|
||||
line_endings = "Unix"
|
||||
indent_type = "Tabs"
|
||||
indent_width = 4
|
||||
quote_style = "AutoPreferSingle"
|
||||
@@ -1,15 +1,7 @@
|
||||
"$schema" = 'https://starship.rs/config-schema.json'
|
||||
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
|
||||
[directory]
|
||||
@@ -38,13 +30,3 @@ stashed = "≡"
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
detect_extensions = []
|
||||
detect_files = []
|
||||
|
||||
@@ -31,6 +31,7 @@ export PATH="$HOME/.local/bin:$PATH"
|
||||
|
||||
alias ls="ls -a --color"
|
||||
# alias grep="rg"
|
||||
#
|
||||
if [[ $(uname) != "Darwin" ]]; then
|
||||
alias update_world='doas emerge --ask --update --newuse --deep @world'
|
||||
alias env="sh /home/andrew/personal/dotfiles/env_linux.sh"
|
||||
@@ -38,6 +39,7 @@ else
|
||||
alias env='sh ~/personal/dotfiles/env_mac.sh'
|
||||
export LIBRARY_PATH="$LIBRARY_PATH:$(brew --prefix)/lib"
|
||||
export PATH="$(brew --prefix llvm)/bin:$PATH"
|
||||
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||
export GOOGLE_CLOUD_PROJECT="development-477121"
|
||||
export HOMEBREW_NO_AUTO_UPDATE=1
|
||||
export HOMEBREW_NO_ENV_HINTS=1
|
||||
|
||||
Reference in New Issue
Block a user