initial home-manager setup with neovim and starship
This commit is contained in:
parent
9a45f4f10a
commit
71c45e8397
6 changed files with 235 additions and 0 deletions
35
neovim/init.lua
Normal file
35
neovim/init.lua
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
vim.opt.number = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.undofile = true
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
vim.cmd [[
|
||||
highlight Normal guibg=none
|
||||
highlight NonText guibg=none
|
||||
highlight Normal ctermbg=none
|
||||
highlight NonText ctermbg=none
|
||||
]]
|
||||
vim.cmd.colorscheme "tokyonight-night";
|
||||
-- Disable netrw first:
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
})
|
||||
require("oil").setup({
|
||||
default_file_explorer = true,
|
||||
})
|
||||
vim.lsp.config['rust-analyzer'] = {
|
||||
cmd = { 'rust-analyzer' },
|
||||
filetypes = { 'rust' },
|
||||
root_markers = { {'Cargo.toml', 'Cargo.lock'} },
|
||||
}
|
||||
vim.lsp.enable('rust-analyzer')
|
||||
-- Keymaps
|
||||
vim.keymap.set("n", "-", require("oil").open, { desc = "Open Oil" })
|
||||
vim.keymap.set("n", "<leader>-", require("oil").open_float, { desc = "Open Oil float" })
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
|
||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
|
||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
|
||||
Loading…
Add table
Add a link
Reference in a new issue