mirror of
https://github.com/mikkelsvartveit/dotfiles.git
synced 2025-12-22 11:12:39 +00:00
Run formatter on plugins.lua
This commit is contained in:
parent
a8057cb6a9
commit
261ae0f781
1 changed files with 293 additions and 290 deletions
|
|
@ -20,24 +20,24 @@ require("lazy").setup({
|
|||
name = "catppuccin",
|
||||
priority = 1000,
|
||||
config = function(plugin)
|
||||
vim.cmd.colorscheme "catppuccin-macchiato"
|
||||
end
|
||||
vim.cmd.colorscheme("catppuccin-macchiato")
|
||||
end,
|
||||
},
|
||||
|
||||
-- Treesitter config
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
branch = 'master',
|
||||
branch = "master",
|
||||
lazy = false,
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup {
|
||||
require("nvim-treesitter.configs").setup({
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
}
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
|
|
@ -47,16 +47,19 @@ require("lazy").setup({
|
|||
dependencies = {
|
||||
-- Mason for easy LSP installation
|
||||
{ "mason-org/mason.nvim", opts = {} },
|
||||
{ "mason-org/mason-lspconfig.nvim", opts = {
|
||||
{
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
opts = {
|
||||
handlers = {
|
||||
-- Make it play with nvim-cmp
|
||||
function(server_name)
|
||||
require("lspconfig")[server_name].setup({
|
||||
capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
capabilities = require("cmp_nvim_lsp").default_capabilities(),
|
||||
})
|
||||
end,
|
||||
},
|
||||
} },
|
||||
},
|
||||
},
|
||||
|
||||
-- Autocompletion (nvim-cmp)
|
||||
"hrsh7th/nvim-cmp",
|
||||
|
|
@ -65,32 +68,32 @@ require("lazy").setup({
|
|||
},
|
||||
config = function()
|
||||
-- Setup nvim-cmp
|
||||
local cmp = require('cmp')
|
||||
local cmp = require("cmp")
|
||||
cmp.setup({
|
||||
sources = {
|
||||
{name = 'nvim_lsp'},
|
||||
{ name = "nvim_lsp" },
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
-- Enter key confirms completion item
|
||||
['<CR>'] = cmp.mapping.confirm({select = true}),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
|
||||
-- Ctrl + space triggers completion menu
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
}),
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
-- Keymaps
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
callback = function(event)
|
||||
local opts = { buffer = event.buf }
|
||||
|
||||
vim.keymap.set("n", "gd", '<cmd>lua vim.lsp.buf.definition()<cr>', opts)
|
||||
vim.keymap.set("n", "gh", '<cmd>lua vim.diagnostic.open_float()<cr>', opts)
|
||||
vim.keymap.set("n", "gd", "<cmd>lua vim.lsp.buf.definition()<cr>", opts)
|
||||
vim.keymap.set("n", "gh", "<cmd>lua vim.diagnostic.open_float()<cr>", opts)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
|
|
@ -120,7 +123,7 @@ require("lazy").setup({
|
|||
async = false,
|
||||
filter = function(client)
|
||||
return client.name == "null-ls"
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
|
@ -146,7 +149,7 @@ require("lazy").setup({
|
|||
|
||||
-- Auto-match brackets, quotes etc.
|
||||
{
|
||||
'windwp/nvim-autopairs',
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
opts = {},
|
||||
},
|
||||
|
|
@ -242,8 +245,8 @@ require("lazy").setup({
|
|||
"--column",
|
||||
"--smart-case",
|
||||
"--fixed-strings",
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
require("telescope").load_extension("fzf")
|
||||
end,
|
||||
|
|
@ -257,9 +260,9 @@ require("lazy").setup({
|
|||
config = function()
|
||||
require("toggleterm").setup({
|
||||
hide_numbers = true,
|
||||
direction = 'float',
|
||||
direction = "float",
|
||||
open_mapping = [[<C-j>]],
|
||||
shell = 'fish',
|
||||
shell = "fish",
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
|
@ -269,7 +272,7 @@ require("lazy").setup({
|
|||
"CRAG666/code_runner.nvim",
|
||||
cmd = "RunCode",
|
||||
dependencies = {
|
||||
"akinsho/nvim-toggleterm.lua"
|
||||
"akinsho/nvim-toggleterm.lua",
|
||||
},
|
||||
opts = {
|
||||
mode = "toggleterm",
|
||||
|
|
@ -316,6 +319,6 @@ require("lazy").setup({
|
|||
"karb94/neoscroll.nvim",
|
||||
opts = {
|
||||
easing_function = "sine",
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue