Initial commit
This commit is contained in:
6
dot_config/nvim/lua/plugins/autoclose.lua
Normal file
6
dot_config/nvim/lua/plugins/autoclose.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
'm4xshen/autoclose.nvim',
|
||||
config = function()
|
||||
require('autoclose').setup()
|
||||
end
|
||||
}
|
||||
31
dot_config/nvim/lua/plugins/blink.lua
Normal file
31
dot_config/nvim/lua/plugins/blink.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
return {
|
||||
"saghen/blink.cmp",
|
||||
dependecies = { "rafamadriz/friendly-snippets" },
|
||||
version = "1.*",
|
||||
---@module 'blink.cmp'
|
||||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
keymap = {
|
||||
preset = "enter",
|
||||
['<C-k>'] = { 'show_signature', 'hide_signature', 'fallback' },
|
||||
},
|
||||
appearance = {
|
||||
nerd_font_variant = "mono"
|
||||
},
|
||||
signature = {
|
||||
enabled = true
|
||||
},
|
||||
completion = {
|
||||
menu = {
|
||||
draw = {
|
||||
padding = { 0, 1 }, -- padding only on right side
|
||||
components = {
|
||||
kind_icon = {
|
||||
text = function(ctx) return ' ' .. ctx.kind_icon .. ctx.icon_gap .. ' ' end
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
24
dot_config/nvim/lua/plugins/catppuccin.lua
Normal file
24
dot_config/nvim/lua/plugins/catppuccin.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
return
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
config = function()
|
||||
-- require("catppuccin").setup({
|
||||
-- transparent_background = true,
|
||||
-- })
|
||||
|
||||
vim.cmd.colorscheme "catppuccin"
|
||||
end
|
||||
}
|
||||
-- {
|
||||
-- "nyoom-engineering/oxocarbon.nvim",
|
||||
-- config = function()
|
||||
-- vim.opt.background = "dark"
|
||||
-- vim.cmd.colorscheme "oxocarbon"
|
||||
--
|
||||
-- -- vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||
-- -- vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||
-- end
|
||||
-- }
|
||||
22
dot_config/nvim/lua/plugins/conform.lua
Normal file
22
dot_config/nvim/lua/plugins/conform.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
config = function()
|
||||
local conform = require("conform")
|
||||
|
||||
conform.setup {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
python = { "isort", "black", lsp_format = "fallback" },
|
||||
gotmpl = { "djlint" }
|
||||
},
|
||||
format_on_save = {
|
||||
timeout_ms = 500,
|
||||
lsp_format = "fallback"
|
||||
}
|
||||
}
|
||||
|
||||
conform.formatters.djlint = {
|
||||
append_args = { "--max-blank-lines", "5" }
|
||||
}
|
||||
end
|
||||
}
|
||||
77
dot_config/nvim/lua/plugins/dap.lua
Normal file
77
dot_config/nvim/lua/plugins/dap.lua
Normal file
@@ -0,0 +1,77 @@
|
||||
return {
|
||||
"mfussenegger/nvim-dap",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"rcarriga/nvim-dap-ui",
|
||||
"nvim-neotest/nvim-nio",
|
||||
"jay-babu/mason-nvim-dap.nvim",
|
||||
"theHamsta/nvim-dap-virtual-text",
|
||||
},
|
||||
config = function()
|
||||
local mason_dap = require("mason-nvim-dap")
|
||||
local dap = require("dap")
|
||||
local ui = require("dapui")
|
||||
local dap_virtual_text = require("nvim-dap-virtual-text")
|
||||
|
||||
-- Dap Virtual Text
|
||||
dap_virtual_text.setup()
|
||||
|
||||
mason_dap.setup({
|
||||
ensure_installed = { "python" },
|
||||
automatic_installation = true,
|
||||
handlers = {
|
||||
function(config)
|
||||
require("mason-nvim-dap").default_setup(config)
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
-- Configurations
|
||||
dap.configurations = {
|
||||
python = {
|
||||
{
|
||||
-- The first three options are required by nvim-dap
|
||||
type = "python", -- the type here established the link to the adapter definition: `dap.adapters.python`
|
||||
request = "launch",
|
||||
name = "Launch file",
|
||||
|
||||
-- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options
|
||||
|
||||
program = "${file}", -- This configuration will launch the current file if used.
|
||||
pythonPath = function()
|
||||
-- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself.
|
||||
-- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within.
|
||||
-- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable.
|
||||
local cwd = vim.fn.getcwd()
|
||||
if vim.fn.executable(cwd .. "/venv/bin/python") == 1 then
|
||||
return cwd .. "/venv/bin/python"
|
||||
elseif vim.fn.executable(cwd .. "/.venv/bin/python") == 1 then
|
||||
return cwd .. "/.venv/bin/python"
|
||||
else
|
||||
return "/usr/bin/python"
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Dap UI
|
||||
|
||||
ui.setup()
|
||||
|
||||
vim.fn.sign_define("DapBreakpoint", { text = "🐞" })
|
||||
|
||||
dap.listeners.before.attach.dapui_config = function()
|
||||
ui.open()
|
||||
end
|
||||
dap.listeners.before.launch.dapui_config = function()
|
||||
ui.open()
|
||||
end
|
||||
dap.listeners.before.event_terminated.dapui_config = function()
|
||||
ui.close()
|
||||
end
|
||||
dap.listeners.before.event_exited.dapui_config = function()
|
||||
ui.close()
|
||||
end
|
||||
end
|
||||
}
|
||||
4
dot_config/nvim/lua/plugins/fidget.lua
Normal file
4
dot_config/nvim/lua/plugins/fidget.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
"j-hui/fidget.nvim",
|
||||
opts = {}
|
||||
}
|
||||
9
dot_config/nvim/lua/plugins/flash.lua
Normal file
9
dot_config/nvim/lua/plugins/flash.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
"folke/flash.nvim",
|
||||
event = "VeryLazy",
|
||||
---@type Flash.Config
|
||||
opts = {},
|
||||
keys = {
|
||||
{ "zk", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
},
|
||||
}
|
||||
17
dot_config/nvim/lua/plugins/linter.lua
Normal file
17
dot_config/nvim/lua/plugins/linter.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
return {
|
||||
'mfussenegger/nvim-lint',
|
||||
config = function()
|
||||
local lint = require("lint")
|
||||
lint.linters_by_ft = {
|
||||
python = { 'mypy' }
|
||||
}
|
||||
|
||||
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(nil, { ignore_errors = true })
|
||||
end,
|
||||
})
|
||||
end
|
||||
}
|
||||
37
dot_config/nvim/lua/plugins/lsp.lua
Normal file
37
dot_config/nvim/lua/plugins/lsp.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
vim.lsp.enable({ "lua_ls",
|
||||
"basedpyright",
|
||||
"gopls",
|
||||
"html",
|
||||
"yamlls",
|
||||
"svelte-language-server",
|
||||
"clangd",
|
||||
"ansiblels",
|
||||
"vtsls",
|
||||
"zls",
|
||||
"glsl_analyzer",
|
||||
"rust_analyzer",
|
||||
"templ",
|
||||
"tailwindcss",
|
||||
})
|
||||
|
||||
|
||||
-- Testing basedpyright atm, change to jedi idk
|
||||
vim.lsp.config("basedpyright", {
|
||||
settings = {
|
||||
['basedpyright'] = {
|
||||
analysis = {
|
||||
typeCheckingMode = "basic",
|
||||
inlayHints = {
|
||||
variableTypes = true,
|
||||
genericTypes = true,
|
||||
},
|
||||
autoFormatStrings = true,
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
}
|
||||
11
dot_config/nvim/lua/plugins/lualine.lua
Normal file
11
dot_config/nvim/lua/plugins/lualine.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
config = function()
|
||||
require('lualine').setup({
|
||||
options = {
|
||||
theme = 'dracula'
|
||||
}
|
||||
})
|
||||
end
|
||||
}
|
||||
4
dot_config/nvim/lua/plugins/mason.lua
Normal file
4
dot_config/nvim/lua/plugins/mason.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
"mason-org/mason.nvim",
|
||||
opts = {}
|
||||
}
|
||||
22
dot_config/nvim/lua/plugins/neotest.lua
Normal file
22
dot_config/nvim/lua/plugins/neotest.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
return {
|
||||
"nvim-neotest/neotest",
|
||||
dependencies = {
|
||||
"nvim-neotest/nvim-nio",
|
||||
"nvim-neotest/neotest-python",
|
||||
"nvim-neotest/neotest-go",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"antoinemadec/FixCursorHold.nvim",
|
||||
"nvim-treesitter/nvim-treesitter"
|
||||
},
|
||||
config = function()
|
||||
require("neotest").setup({
|
||||
adapters = {
|
||||
require("neotest-python"),
|
||||
require("neotest-go")
|
||||
},
|
||||
diagnostic = {
|
||||
enabled = true
|
||||
}
|
||||
})
|
||||
end
|
||||
}
|
||||
10
dot_config/nvim/lua/plugins/oil.lua
Normal file
10
dot_config/nvim/lua/plugins/oil.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
return {
|
||||
'stevearc/oil.nvim',
|
||||
---@module 'oil'
|
||||
---@type oil.SetupOpts
|
||||
opts = {},
|
||||
-- Optional dependencies
|
||||
dependencies = { { "nvim-mini/mini.icons", opts = {} } },
|
||||
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
|
||||
lazy = false,
|
||||
}
|
||||
33
dot_config/nvim/lua/plugins/telescope.lua
Normal file
33
dot_config/nvim/lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
return {
|
||||
{
|
||||
'nvim-telescope/telescope.nvim',
|
||||
tag = '0.1.6',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'BurntSushi/ripgrep',
|
||||
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' }
|
||||
},
|
||||
},
|
||||
{
|
||||
'nvim-telescope/telescope-ui-select.nvim',
|
||||
config = function()
|
||||
local telescope = require("telescope")
|
||||
telescope.setup({
|
||||
pickers = {
|
||||
find_files = {
|
||||
find_command = { "rg", "--files", "--glob", "!**/vendor/*", "--glob", "!*_templ.go" }
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown {
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
telescope.load_extension("ui-select")
|
||||
telescope.load_extension("fzf")
|
||||
end
|
||||
}
|
||||
}
|
||||
19
dot_config/nvim/lua/plugins/tiny-inline.lua
Normal file
19
dot_config/nvim/lua/plugins/tiny-inline.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
return {
|
||||
"rachartier/tiny-inline-diagnostic.nvim",
|
||||
event = "VeryLazy",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require('tiny-inline-diagnostic').setup({
|
||||
preset = "modern",
|
||||
transparent_bg = true,
|
||||
|
||||
options = {
|
||||
multilines = {
|
||||
enabled = true,
|
||||
always_show = true,
|
||||
}
|
||||
}
|
||||
})
|
||||
vim.diagnostic.config({ virtual_text = false }) -- Disable Neovim's default virtual text diagnostics
|
||||
end,
|
||||
}
|
||||
15
dot_config/nvim/lua/plugins/tmux.lua
Normal file
15
dot_config/nvim/lua/plugins/tmux.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
'alexghergh/nvim-tmux-navigation',
|
||||
config = function()
|
||||
require 'nvim-tmux-navigation'.setup {
|
||||
disable_when_zoomed = false, -- defaults to false
|
||||
keybindings = {
|
||||
left = "<C-h>",
|
||||
down = "<C-j>",
|
||||
up = "<C-k>",
|
||||
right = "<C-l>",
|
||||
last_active = "<C-\\>",
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
25
dot_config/nvim/lua/plugins/treesitter.lua
Normal file
25
dot_config/nvim/lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = { "lua", "go", "zig", "markdown", "json", "yaml", "javascript",
|
||||
"typescript", "bash", "python", "c_sharp", "cpp", "gleam", "svelte" },
|
||||
indent = { enable = true },
|
||||
sync_install = false,
|
||||
|
||||
highlight = { enable = true },
|
||||
})
|
||||
|
||||
local treesitter_parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
||||
treesitter_parser_config.templ = {
|
||||
install_info = {
|
||||
url = "https://github.com/vrischmann/tree-sitter-templ.git",
|
||||
files = { "src/parser.c", "src/scanner.c" },
|
||||
branch = "master",
|
||||
},
|
||||
}
|
||||
|
||||
vim.treesitter.language.register("templ", "templ")
|
||||
end
|
||||
}
|
||||
11
dot_config/nvim/lua/plugins/vim-lazy-dev.lua
Normal file
11
dot_config/nvim/lua/plugins/vim-lazy-dev.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua", -- only load on lua files
|
||||
opts = {
|
||||
library = {
|
||||
-- See the configuration section for more details
|
||||
-- Load luvit types when the `vim.uv` word is found
|
||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||
},
|
||||
},
|
||||
}
|
||||
27
dot_config/nvim/lua/plugins/which-key.lua
Normal file
27
dot_config/nvim/lua/plugins/which-key.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>?",
|
||||
function()
|
||||
require("which-key").show({ global = false })
|
||||
end,
|
||||
desc = "Buffer Local Keymaps (which-key)",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local wk = require("which-key")
|
||||
wk.add({
|
||||
{ "<leader>d", group = "Debug" },
|
||||
{ "<leader>f", group = "Telescope" },
|
||||
{ "<leader>t", group = "Test" },
|
||||
{ "<leader>c", group = "Code" },
|
||||
})
|
||||
end
|
||||
}
|
||||
11
dot_config/nvim/lua/vim-options.lua
Normal file
11
dot_config/nvim/lua/vim-options.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
vim.g.mapleader = " "
|
||||
vim.cmd("set tabstop=2")
|
||||
vim.cmd("set softtabstop=2")
|
||||
vim.cmd("set shiftwidth=2")
|
||||
vim.cmd("set expandtab")
|
||||
vim.cmd("set clipboard+=unnamedplus")
|
||||
vim.cmd("highlight Normal guibg=none")
|
||||
vim.cmd("highlight NonText guibg=none")
|
||||
vim.cmd("highlight Normal ctermbg=none")
|
||||
vim.cmd("highlight NonText ctermbg=none")
|
||||
vim.o.winborder = 'rounded'
|
||||
Reference in New Issue
Block a user