Fixes #2 add markdown, add auto formatting on save
This commit is contained in:
parent
d332337f07
commit
33c2215f40
12 changed files with 189 additions and 150 deletions
|
@ -15,11 +15,11 @@ For stow to restore the old state you have to run following command.
|
||||||
|
|
||||||
`git clone https://git.snrd.eu/Spaenny/dotfiles.git && cd dotfiles`
|
`git clone https://git.snrd.eu/Spaenny/dotfiles.git && cd dotfiles`
|
||||||
|
|
||||||
`stow alacritty nvim plasma zsh tmux git pipewire`
|
`stow alacritty nvim plasma zsh tmux git pipewire stylua`
|
||||||
|
|
||||||
If you just wanna restore one application config you can do so by executing it via package name.
|
If you just wanna restore one application config you can do so by executing it via package name.
|
||||||
`stow nvim`
|
`stow nvim`
|
||||||
This would just restore the nvim config files.
|
This would just restore the nvim config files.
|
||||||
|
|
||||||
|
|
||||||
WARNING: This will instantly apply my Dotfiles to your machine, for further information how todo this step by step checkout.
|
#### WARNING: This will instantly apply my Dotfiles to your machine, for further information how todo this step by step checkout.
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
|
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
vim.fn.system({
|
vim.fn.system({
|
||||||
"git",
|
"git",
|
||||||
"clone",
|
"clone",
|
||||||
"--filter=blob:none",
|
"--filter=blob:none",
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
"--branch=stable", -- latest stable release
|
"--branch=stable", -- latest stable release
|
||||||
lazypath,
|
lazypath,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
|
|
@ -1,44 +1,44 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"saadparwaiz1/cmp_luasnip",
|
"saadparwaiz1/cmp_luasnip",
|
||||||
"rafamadriz/friendly-snippets"
|
"rafamadriz/friendly-snippets",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
config = function()
|
config = function()
|
||||||
local cmp = require('cmp')
|
local cmp = require("cmp")
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
require('luasnip').lsp_expand(args.body)
|
require("luasnip").lsp_expand(args.body)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
completion = cmp.config.window.bordered(),
|
completion = cmp.config.window.bordered(),
|
||||||
documentation = cmp.config.window.bordered(),
|
documentation = cmp.config.window.bordered(),
|
||||||
},
|
},
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
['<C-e>'] = cmp.mapping.abort(),
|
["<C-e>"] = cmp.mapping.abort(),
|
||||||
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||||
}),
|
}),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
--{ name = 'nvim_lsp' },
|
--{ name = 'nvim_lsp' },
|
||||||
{ name = 'luasnip' },
|
{ name = "luasnip" },
|
||||||
}, {
|
}, {
|
||||||
{ name = 'buffer' },
|
{ name = "buffer" },
|
||||||
})
|
}),
|
||||||
})
|
})
|
||||||
end
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
'maxmx03/dracula.nvim',
|
"maxmx03/dracula.nvim",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function ()
|
config = function()
|
||||||
local dracula = require "dracula"
|
local dracula = require("dracula")
|
||||||
|
|
||||||
dracula.setup({
|
dracula.setup({
|
||||||
transparent = false,
|
transparent = false,
|
||||||
plugins = {
|
plugins = {
|
||||||
["nvim-treesitter"] = true,
|
["nvim-treesitter"] = true,
|
||||||
["nvim-lspconfig"] = true,
|
["nvim-lspconfig"] = true,
|
||||||
["nvim-cmp"] = true,
|
["nvim-cmp"] = true,
|
||||||
["neo-tree.nvim"] = true,
|
["neo-tree.nvim"] = true,
|
||||||
["gitsigns.nvim"] = true,
|
["gitsigns.nvim"] = true,
|
||||||
["lazy.nvim"] = true,
|
["lazy.nvim"] = true,
|
||||||
["telescope.nvim"] = true,
|
["telescope.nvim"] = true,
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
vim.cmd.colorscheme 'dracula'
|
vim.cmd.colorscheme("dracula")
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
29
nvim/.config/nvim/lua/plugins/formatter.lua
Normal file
29
nvim/.config/nvim/lua/plugins/formatter.lua
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
return {
|
||||||
|
"nvimtools/none-ls.nvim",
|
||||||
|
requires = { "nvim-lua/plenary.nvim" },
|
||||||
|
config = function()
|
||||||
|
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||||
|
local null_ls = require("null-ls")
|
||||||
|
null_ls.setup({
|
||||||
|
sources = {
|
||||||
|
null_ls.builtins.formatting.golines,
|
||||||
|
null_ls.builtins.formatting.htmlbeautifier,
|
||||||
|
null_ls.builtins.formatting.nginx_beautifier,
|
||||||
|
null_ls.builtins.formatting.prettierd,
|
||||||
|
null_ls.builtins.formatting.stylua,
|
||||||
|
},
|
||||||
|
on_attach = function(client, bufnr)
|
||||||
|
if client.supports_method("textDocument/formatting") then
|
||||||
|
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
|
group = augroup,
|
||||||
|
buffer = bufnr,
|
||||||
|
callback = function()
|
||||||
|
vim.lsp.buf.format({ async = false })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
|
@ -1,11 +1,11 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"tpope/vim-fugitive"
|
"tpope/vim-fugitive",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("gitsigns").setup()
|
require("gitsigns").setup()
|
||||||
end
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,19 +2,31 @@ return {
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require('mason').setup()
|
require("mason").setup()
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
auto_install = true
|
auto_install = true,
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require('mason-lspconfig').setup({
|
require("mason-lspconfig").setup({
|
||||||
ensure_installed = { "lua_ls", "bashls", "gopls", "jsonls", "biome", "zk", "pyre", "rust_analyzer", "sqls", "taplo", "yamlls" }
|
ensure_installed = {
|
||||||
|
"lua_ls",
|
||||||
|
"bashls",
|
||||||
|
"gopls",
|
||||||
|
"jsonls",
|
||||||
|
"biome",
|
||||||
|
"zk",
|
||||||
|
"pyre",
|
||||||
|
"rust_analyzer",
|
||||||
|
"sqls",
|
||||||
|
"taplo",
|
||||||
|
"yamlls",
|
||||||
|
},
|
||||||
})
|
})
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
|
@ -33,6 +45,6 @@ return {
|
||||||
lspconfig.sqls.setup({ capabilities = capabilities })
|
lspconfig.sqls.setup({ capabilities = capabilities })
|
||||||
lspconfig.taplo.setup({ capabilities = capabilities })
|
lspconfig.taplo.setup({ capabilities = capabilities })
|
||||||
lspconfig.yamlls.setup({ capabilities = capabilities })
|
lspconfig.yamlls.setup({ capabilities = capabilities })
|
||||||
end
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
return
|
return {
|
||||||
{
|
"nvim-lualine/lualine.nvim",
|
||||||
'nvim-lualine/lualine.nvim',
|
opts = {
|
||||||
opts = {
|
options = {
|
||||||
options = {
|
theme = vim.g.colors_name,
|
||||||
theme = vim.g.colors_name,
|
refresh = {
|
||||||
refresh = {
|
statusline = 1000,
|
||||||
statusline = 1000,
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
}
|
|
||||||
|
|
7
nvim/.config/nvim/lua/plugins/markdown.lua
Normal file
7
nvim/.config/nvim/lua/plugins/markdown.lua
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
return {
|
||||||
|
"MeanderingProgrammer/markdown.nvim",
|
||||||
|
dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, -- if you prefer nvim-web-devicons
|
||||||
|
config = function()
|
||||||
|
require("render-markdown").setup({})
|
||||||
|
end,
|
||||||
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
return {
|
return {
|
||||||
'nvim-neo-tree/neo-tree.nvim',
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
branch = 'v3.x',
|
branch = "v3.x",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-lua/plenary.nvim',
|
"nvim-lua/plenary.nvim",
|
||||||
'nvim-tree/nvim-web-devicons',
|
"nvim-tree/nvim-web-devicons",
|
||||||
'MunifTanjim/nui.nvim',
|
"MunifTanjim/nui.nvim",
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
filesystem = {
|
filesystem = {
|
||||||
|
@ -14,13 +14,11 @@ return {
|
||||||
hide_dotfiles = false,
|
hide_dotfiles = false,
|
||||||
hide_gitignored = true,
|
hide_gitignored = true,
|
||||||
hide_by_name = {
|
hide_by_name = {
|
||||||
'.DS_Store',
|
".DS_Store",
|
||||||
'thumbs.db'
|
"thumbs.db",
|
||||||
},
|
},
|
||||||
never_show = { '.git' }
|
never_show = { ".git" },
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,25 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
'nvim-telescope/telescope.nvim',
|
"nvim-telescope/telescope.nvim",
|
||||||
tag = '0.1.6',
|
tag = "0.1.6",
|
||||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
config = function ()
|
config = function()
|
||||||
local builtin = require("telescope.builtin")
|
local builtin = require("telescope.builtin")
|
||||||
vim.keymap.set("n", "<C-p>", builtin.find_files, {}) -- ctrl + p = fuzzy file find
|
vim.keymap.set("n", "<C-p>", builtin.find_files, {}) -- ctrl + p = fuzzy file find
|
||||||
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {}) -- space + fg = fuzzy grep in files
|
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {}) -- space + fg = fuzzy grep in files
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'nvim-telescope/telescope-ui-select.nvim',
|
"nvim-telescope/telescope-ui-select.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("telescope").setup({
|
require("telescope").setup({
|
||||||
extensions = {
|
extensions = {
|
||||||
["ui-select"] = {
|
["ui-select"] = {
|
||||||
require("telescope.themes").get_dropdown {}
|
require("telescope.themes").get_dropdown({}),
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
require("telescope").load_extension("ui-select")
|
require("telescope").load_extension("ui-select")
|
||||||
end
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
return {
|
return {
|
||||||
'nvim-treesitter/nvim-treesitter',
|
"nvim-treesitter/nvim-treesitter",
|
||||||
build = function()
|
build = function()
|
||||||
require("nvim-treesitter.install").update({ with_sync = true })()
|
require("nvim-treesitter.install").update({ with_sync = true })()
|
||||||
end,
|
end,
|
||||||
config = function()
|
config = function()
|
||||||
local config = require("nvim-treesitter.configs")
|
local config = require("nvim-treesitter.configs")
|
||||||
config.setup({
|
config.setup({
|
||||||
ensure_installed = {"lua", "javascript", "go", "toml", "json", "yaml"},
|
ensure_installed = { "lua", "javascript", "go", "toml", "json", "yaml" },
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
})
|
})
|
||||||
end
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue