chore: initial commit
This commit is contained in:
87
dot_config/nvim/init.lua
Normal file
87
dot_config/nvim/init.lua
Normal file
@@ -0,0 +1,87 @@
|
||||
vim.o.number = true
|
||||
vim.o.signcolumn = "yes"
|
||||
vim.o.winborder = "rounded"
|
||||
vim.g.loaded_perl_provider = 0
|
||||
vim.g.airline_powerline_fonts = 1
|
||||
|
||||
vim.cmd([[set listchars=tab:▸\ ,eol:¬]])
|
||||
|
||||
vim.keymap.set("n", "<leader>r", ":edit $MYVIMRC<cr>")
|
||||
vim.keymap.set("n", "<leader>f", vim.lsp.buf.format)
|
||||
vim.keymap.set("n", "<leader>D", vim.lsp.buf.definition)
|
||||
vim.keymap.set("n", "<leader>U", function() MiniExtra.pickers.lsp({ scope = "references" }) end)
|
||||
vim.keymap.set("n", "<leader>p", vim.lsp.buf.hover, { desc = "LSP Hover" })
|
||||
vim.keymap.set("n", "<leader>l", ":set list!<cr>")
|
||||
vim.keymap.set("n", "<leader>]", ":bn<cr>")
|
||||
vim.keymap.set("n", "<leader>[", ":bp<cr>")
|
||||
vim.keymap.set("n", "<leader>d", ":bd<cr>")
|
||||
vim.keymap.set("n", "<esc><esc>", "<esc>:nohlsearch<cr><esc>")
|
||||
vim.keymap.set("n", "<space>", "zz")
|
||||
vim.keymap.set("n", "<leader>w", ":update<cr>")
|
||||
vim.keymap.set("n", "<c-p>", ":Pick files<cr>")
|
||||
vim.keymap.set("n", "<leader>h", ":Pick help<cr>")
|
||||
|
||||
vim.pack.add(
|
||||
{
|
||||
{ src = "https://github.com/nvim-lua/plenary.nvim" }, -- Base functions library
|
||||
{ src = "https://github.com/folke/lazydev.nvim" }, -- Lua Vim types
|
||||
{ src = "https://github.com/andythigpen/nvim-coverage" }, -- Code coverage visualuzer
|
||||
{ src = "https://github.com/echasnovski/mini.icons" }, -- Icons for Ctrl-P
|
||||
{ src = "https://github.com/echasnovski/mini.pick" }, -- Ctrl-P Alternative
|
||||
{ src = "https://github.com/echasnovski/mini.extra" }, -- Additional things for mini tools
|
||||
{ src = "https://github.com/lewis6991/gitsigns.nvim" }, -- Show git changes in the gutter
|
||||
{ src = "https://github.com/neovim/nvim-lspconfig" }, -- Common LSP Configurations
|
||||
{ src = "https://github.com/sbdchd/neoformat" }, -- Formatter
|
||||
{ src = "https://github.com/tpope/vim-fugitive" }, -- Git bindings
|
||||
{ src = "https://github.com/vim-airline/vim-airline-themes" }, -- Status bar theme
|
||||
{ src = "https://github.com/vim-airline/vim-airline" }, -- Status bar
|
||||
{ src = "https://github.com/rebelot/kanagawa.nvim" }, -- Theme
|
||||
{ src = "https://github.com/mfussenegger/nvim-lint" }, -- Linter
|
||||
{ src = "https://github.com/rachartier/tiny-inline-diagnostic.nvim" }, -- Inline diagnostics
|
||||
{ src = "https://github.com/j-hui/fidget.nvim" }, -- LSP Status Popup
|
||||
}
|
||||
)
|
||||
|
||||
-- Airline
|
||||
vim.cmd [[
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
]]
|
||||
|
||||
-- Ctrl-P
|
||||
require("mini.pick").setup()
|
||||
require("mini.icons").setup()
|
||||
require("mini.extra").setup()
|
||||
|
||||
-- Coverage
|
||||
require("coverage").setup()
|
||||
|
||||
-- Lint
|
||||
require("lint").linters_by_ft = {
|
||||
sh = { "shellcheck" }
|
||||
}
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
callback = function()
|
||||
require("lint").try_lint()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Theme
|
||||
vim.cmd.colorscheme "kanagawa-dragon"
|
||||
|
||||
-- LSP
|
||||
vim.lsp.enable({ "lua_ls", "ts_ls", "bashls", "yamlls" })
|
||||
vim.lsp.config("lua_ls", {
|
||||
settings = {
|
||||
Lua = {
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
-- Fidget
|
||||
require("fidget").setup()
|
||||
|
||||
-- Diagnostic
|
||||
require('tiny-inline-diagnostic').setup()
|
||||
vim.diagnostic.config({ virtual_text = false })
|
||||
Reference in New Issue
Block a user