initial configuration
This commit is contained in:
12
modules/home/programs/neovim/plugins/bufferline.lua
Normal file
12
modules/home/programs/neovim/plugins/bufferline.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
require('bufferline').setup{
|
||||
options = {
|
||||
offsets = {
|
||||
{
|
||||
filetype = "NvimTree",
|
||||
text = "File Explorer",
|
||||
highlight = "Directory",
|
||||
separator = true -- use a "true" to enable the default, or set your own character
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
46
modules/home/programs/neovim/plugins/cmp.lua
Normal file
46
modules/home/programs/neovim/plugins/cmp.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
local cmp = require('cmp')
|
||||
local luasnip = require('luasnip')
|
||||
|
||||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
luasnip.config.setup {}
|
||||
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert {
|
||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete {},
|
||||
['<CR>'] = cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
},
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
},
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
},
|
||||
}
|
42
modules/home/programs/neovim/plugins/lsp.lua
Normal file
42
modules/home/programs/neovim/plugins/lsp.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
require("mason").setup{
|
||||
PATH = "append",
|
||||
}
|
||||
require("mason-lspconfig").setup()
|
||||
require('neodev').setup()
|
||||
|
||||
local lspconfig = require('lspconfig')
|
||||
|
||||
vim.g.rustaceanvim = {
|
||||
inlay_hints = {
|
||||
highlight = "NonText",
|
||||
},
|
||||
tools = {
|
||||
hover_actions = {
|
||||
auto_focus = true,
|
||||
},
|
||||
},
|
||||
server = {
|
||||
on_attach = function(client, bufnr)
|
||||
require("lsp-inlayhints").on_attach(client, bufnr)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
lspconfig.tsserver.setup{}
|
||||
|
||||
lspconfig.spyglassmc_language_server.setup{}
|
||||
|
||||
lspconfig.arduino_language_server.setup{
|
||||
cmd = {
|
||||
"steam-run","arduino-language-server",
|
||||
"-cli-config", "/home/xeovalyte/.arduino15/arduino-cli.yaml",
|
||||
"-cli", "/usr/bin/arduino-cli",
|
||||
"-clangd", "steam-run clangd"
|
||||
}
|
||||
}
|
||||
|
||||
lspconfig.tailwindcss.setup{}
|
||||
|
||||
lspconfig.volar.setup{}
|
||||
|
||||
lspconfig.marksman.setup{}
|
@@ -0,0 +1,2 @@
|
||||
vim.g.mkdp_auto_start = 0
|
||||
vim.g.mkdp_auto_close = 0
|
20
modules/home/programs/neovim/plugins/nvim-tree.lua
Normal file
20
modules/home/programs/neovim/plugins/nvim-tree.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
local function my_on_attach(bufnr)
|
||||
local api = require "nvim-tree.api"
|
||||
|
||||
local function opts(desc)
|
||||
return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
|
||||
end
|
||||
|
||||
-- default mappings
|
||||
api.config.mappings.default_on_attach(bufnr)
|
||||
|
||||
-- custom mappings
|
||||
vim.keymap.set('n', '<C-t>', api.tree.change_root_to_parent, opts('Up'))
|
||||
vim.keymap.set('n', '?', api.tree.toggle_help, opts('Help'))
|
||||
vim.keymap.set('n', '.', api.tree.change_root_to_node, opts('CD'))
|
||||
end
|
||||
|
||||
-- pass to setup along with your other options
|
||||
require("nvim-tree").setup {
|
||||
on_attach = my_on_attach,
|
||||
}
|
7
modules/home/programs/neovim/plugins/toggleterm.lua
Normal file
7
modules/home/programs/neovim/plugins/toggleterm.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
require("toggleterm").setup{
|
||||
open_mapping = [[<c-\>]],
|
||||
direction = 'float',
|
||||
float_opts = {
|
||||
border = 'curved'
|
||||
}
|
||||
}
|
9
modules/home/programs/neovim/plugins/treesitter.lua
Normal file
9
modules/home/programs/neovim/plugins/treesitter.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
require("nvim-treesitter.configs").setup{
|
||||
ensure_installed = {},
|
||||
|
||||
auto_install = false,
|
||||
|
||||
highlight = { enable = true },
|
||||
|
||||
indent = { enable = true },
|
||||
}
|
Reference in New Issue
Block a user