Improved configuration

This commit is contained in:
Eduard Urbach 2023-07-30 00:50:07 +02:00
parent 54f8e49a5c
commit a407764a62
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0
12 changed files with 62 additions and 43 deletions

View File

@ -3,11 +3,12 @@ $env.EDITOR = 'nvim'
$env.GOPATH = $"($env.HOME)/.go"
# Aliases
alias ll = ls -la
alias gb = go build
alias gt = go test
alias gd = git diff
alias gp = git pull
alias gs = git status
alias hex = hexdump -C
alias home = /usr/bin/git $"--git-dir=($env.HOME)/.home/" $"--work-tree=($env.HOME)"
alias home = git $"--git-dir=($env.HOME)/.home/" $"--work-tree=($env.HOME)"
alias ll = ls -la
alias n = nvim

View File

@ -41,7 +41,7 @@
"onedark.nvim": { "branch": "master", "commit": "cae5fdf035ee92c407a29ee2ccfcff503d2be7f1" },
"persistence.nvim": { "branch": "main", "commit": "4b8051c01f696d8849a5cb8afa9767be8db16e40" },
"plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" },
"telescope.nvim": { "branch": "master", "commit": "22735947d84d78f29436c203f0a4b8dc15dda204" },
"telescope.nvim": { "branch": "master", "commit": "b6fccfb0f7589a87587875206786daccba62acc3" },
"todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" },
"tokyonight.nvim": { "branch": "main", "commit": "1ee11019f8a81dac989ae1db1a013e3d582e2033" },
"trouble.nvim": { "branch": "main", "commit": "40aad004f53ae1d1ba91bcc5c29d59f07c5f01d3" },

View File

@ -1,3 +1,16 @@
-- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
-- Add any additional autocmds here
-- Disable spell checking
vim.api.nvim_clear_autocmds({
group = "lazyvim_wrap_spell",
})
-- Enable wrapping
vim.api.nvim_create_autocmd("FileType", {
pattern = { "gitcommit", "markdown" },
callback = function()
vim.opt_local.wrap = true
end,
})

View File

@ -1,41 +1,25 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
-- bootstrap lazy.nvim
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import any extras modules here
-- { import = "lazyvim.plugins.extras.lang.typescript" },
-- { import = "lazyvim.plugins.extras.lang.json" },
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
-- import/override with your plugins
{ import = "plugins" },
},
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
version = false,
},
install = { colorscheme = { "tokyonight", "habamax" } },
checker = { enabled = true }, -- automatically check for plugin updates
install = { colorscheme = { "onedark" } },
checker = { enabled = true },
performance = {
rtp = {
-- disable some rtp plugins
disabled_plugins = {
"gzip",
-- "matchit",
-- "matchparen",
-- "netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",

View File

@ -10,4 +10,5 @@ opt.tabstop = 4
opt.softtabstop = 4
opt.autoindent = true
opt.smartindent = true
opt.spell = false
opt.conceallevel = 0

View File

@ -0,0 +1,13 @@
return {
"jose-elias-alvarez/null-ls.nvim",
opts = function()
local nls = require("null-ls")
return {
sources = {
nls.builtins.formatting.prettierd,
nls.builtins.formatting.shfmt,
nls.builtins.formatting.stylua,
},
}
end,
}

View File

@ -1,15 +1,18 @@
-- syntax highlighting
return {
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"lua",
-- web dev
"html",
"css",
"javascript",
"typescript",
"svelte",
"json",
-- go
"go",
"gomod",
"gowork",

View File

@ -2,8 +2,15 @@ return {
"neovim/nvim-lspconfig",
opts = {
servers = {
lua_ls = {},
-- web dev
cssls = {},
html = {},
tsserver = {},
svelte = {},
-- go
gopls = {
settings = {
gopls = {
@ -11,9 +18,6 @@ return {
},
},
},
lua_ls = {},
svelte = {},
tsserver = {},
},
},
}

View File

@ -0,0 +1,15 @@
return {
"williamboman/mason.nvim",
opts = {
ensure_installed = {
-- Go
"gofumpt",
-- HTML, CSS, JS, TS, JSON, Markdown, YAML
"prettierd",
-- Bash
"shfmt",
-- Lua
"stylua",
},
},
}

View File

@ -1,15 +0,0 @@
return {
{
"williamboman/mason.nvim",
opts = function(_, opts)
table.insert(opts.ensure_installed, "prettierd")
end,
},
{
"jose-elias-alvarez/null-ls.nvim",
opts = function(_, opts)
local nls = require("null-ls")
table.insert(opts.sources, nls.builtins.formatting.prettierd)
end,
},
}