Updated Rofi and Neovim config

This commit is contained in:
2024-04-15 15:06:07 +02:00
parent 0bbd37f3a4
commit b49db78ed5
8 changed files with 184 additions and 7 deletions

View File

@@ -15,3 +15,10 @@ api.nvim_create_autocmd({
},
{ pattern = "*.mcfunction", command = "set filetype=mcfunction" }
)
api.nvim_create_autocmd({
"VimEnter"
},
{ callback = require('lualine').setup }
)

View File

@@ -119,8 +119,13 @@
}
{
plugin = bufferline-nvim;
config = toLuaFile ./plugins/bufferline.lua;
plugin = lualine-nvim;
config = toLuaFile ./plugins/lualine.lua;
}
{
plugin =harpoon;
config = toLuaFile ./plugins/harpoon.lua;
}
];
};

View File

@@ -27,7 +27,7 @@ opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
opt.shiftround = true -- Round indent
opt.shiftwidth = 2 -- Size of an indent
opt.shortmess:append({ W = true, I = true, c = true })
opt.showmode = false -- Dont show mode since we have a statusline
opt.showmode = true -- Dont show mode since we have a statusline
opt.sidescrolloff = 8 -- Columns of context
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
opt.smartcase = true -- Don't ignore case with capitals

View File

@@ -0,0 +1,10 @@
local mark = require('harpoon.mark')
local ui = require('harpoon.ui')
vim.keymap.set("n", "<leader>q", mark.add_file)
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end)
vim.keymap.set("n", "<C-t>", function() ui.nav_file(2) end)
vim.keymap.set("n", "<C-n>", function() ui.nav_file(3) end)
vim.keymap.set("n", "<C-s>", function() ui.nav_file(4) end)

View File

@@ -3,13 +3,11 @@ require("mason").setup{
}
require("mason-lspconfig").setup()
require('neodev').setup()
require('lsp-inlayhints').setup()
local lspconfig = require('lspconfig')
vim.g.rustaceanvim = {
inlay_hints = {
highlight = "NonText",
},
tools = {
hover_actions = {
auto_focus = true,
@@ -18,6 +16,7 @@ vim.g.rustaceanvim = {
server = {
on_attach = function(client, bufnr)
require("lsp-inlayhints").on_attach(client, bufnr)
require("lsp-inlayhints").show()
end,
default_settings = {
['rust-analyzer'] = {

View File

@@ -0,0 +1,40 @@
require('lualine').setup {
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 = true,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'},
lualine_x = {'encoding', 'fileformat', '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 = {}
}