initial commit
This commit is contained in:
commit
970a7c22e1
8 changed files with 477 additions and 0 deletions
33
lua/configs/cmp.lua
Normal file
33
lua/configs/cmp.lua
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
local cmp = require "cmp"
|
||||
|
||||
local options = {
|
||||
completion = {
|
||||
completeopt = 'menu,menuone,noinsert,noselect'
|
||||
},
|
||||
|
||||
mapping = {
|
||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.close(),
|
||||
["<CR>"] = cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = false,
|
||||
},
|
||||
["<Tab>"] = function(callback)
|
||||
callback()
|
||||
end,
|
||||
["<S-Tab>"] = function(callback)
|
||||
callback()
|
||||
end,
|
||||
},
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "nvim_lua" },
|
||||
{ name = "path" },
|
||||
},
|
||||
}
|
||||
|
||||
return options
|
||||
34
lua/configs/lspconfig.lua
Normal file
34
lua/configs/lspconfig.lua
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
require("mason-lspconfig").setup_handlers {
|
||||
-- The first entry (without a key) will be the default handler
|
||||
-- and will be called for each installed server that doesn't have
|
||||
-- a dedicated handler.
|
||||
function (server_name) -- default handler (optional)
|
||||
require("lspconfig")[server_name].setup {}
|
||||
end,
|
||||
-- Next, you can provide a dedicated handler for specific servers.
|
||||
-- For example, a handler override for the `rust_analyzer`:
|
||||
-- ["rust_analyzer"] = function ()
|
||||
-- require("rust-tools").setup {}
|
||||
-- end
|
||||
["lua_ls"] = function ()
|
||||
require("lspconfig").lua_ls.setup {
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" },
|
||||
},
|
||||
workspace = {
|
||||
library = {
|
||||
[vim.fn.expand "$VIMRUNTIME/lua"] = true,
|
||||
[vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true,
|
||||
[vim.fn.stdpath "data" .. "/lazy/extensions/nvchad_types"] = true,
|
||||
[vim.fn.stdpath "data" .. "/lazy/lazy.nvim/lua/lazy"] = true,
|
||||
},
|
||||
maxPreload = 100000,
|
||||
preloadFileSize = 10000,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
end
|
||||
}
|
||||
41
lua/configs/lualine.lua
Normal file
41
lua/configs/lualine.lua
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
local opts = {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'auto',
|
||||
component_separators = { left = '', right = '' },
|
||||
section_separators = { left = '', right = '' },
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 1000,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
}
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = { 'branch', 'diff' },
|
||||
lualine_c = { 'filename' },
|
||||
lualine_x = { 'lsp_progress', 'diagnostics', 'filetype' },
|
||||
lualine_y = { 'progress' },
|
||||
lualine_z = { 'location' }
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { 'filename' },
|
||||
lualine_x = { 'location' },
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {}
|
||||
}
|
||||
return opts
|
||||
Loading…
Add table
Add a link
Reference in a new issue