Fixed some refactors

This commit is contained in:
FredzyW 2024-10-29 21:14:01 +01:00
parent 7e573af721
commit a8c4cad4c0
6 changed files with 19 additions and 38 deletions

View file

@ -1,5 +1,16 @@
# nvim
# neovim
Detta är ett repo för att hålla filerna till min NeoVim konfiguration.
My Neovim configuration.
Konfigurationen är ganska minimal estetiskt, men har hyfsat mycket funktionalitet.
If you are on NixOS, you need to have the following language servers in your installation:
```nix
nil
jdt-language-server
texlab
marksman
nodePackages_latest.bash-language-server
lua-language-server
tree-sitter
gopls
```

View file

@ -14,8 +14,6 @@ if not vim.loop.fs_stat(lazypath) then
end
vim.opt.rtp:prepend(lazypath)
-- vim.api.nvim_command('autocmd VimEnter * lua require("lualine").hide()')
require("lazy").setup("plugins")
-- Keybindsings

View file

@ -24,12 +24,6 @@ vim.keymap.set("n", "ss", require('substitute').line, { noremap = true })
vim.keymap.set("n", "S", require('substitute').eol, { noremap = true })
vim.keymap.set("x", "s", require('substitute').visual, { noremap = true })
-- Move commands
vim.keymap.set('n', '<Super-j>', ':MoveLine(1)<CR>', opts)
vim.keymap.set('n', '<Super-k>', ':MoveLine(-1)<CR>', opts)
vim.keymap.set('v', '<Super-j>', ':MoveBlock(1)<CR>', opts)
vim.keymap.set('v', '<Super-k>', ':MoveBlock(-1)<CR>', opts)
-- Good navigation mappings for wrap
vim.api.nvim_set_keymap('n', 'j', 'gj', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', 'k', 'gk', { noremap = true, silent = true })
@ -43,7 +37,6 @@ vim.api.nvim_set_keymap('n', '<C-k>', ':wincmd k<CR>', { silent = true })
vim.api.nvim_set_keymap('n', '<C-j>', ':wincmd j<CR>', { silent = true })
vim.api.nvim_set_keymap('n', '<C-h>', ':wincmd h<CR>', { silent = true })
vim.api.nvim_set_keymap('n', '<C-l>', ':wincmd l<CR>', { silent = true })
vim.api.nvim_set_keymap('n', '<Space>c', ':bd<CR>', { silent = true })
-- Highlight yanked
@ -55,17 +48,16 @@ vim.api.nvim_create_autocmd('TextYankPost', {
vim.highlight.on_yank { higroup = 'IncSearch', timeout = 50 }
end,
})
-- Telescope bindings
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<Space>f', builtin.find_files, {})
vim.keymap.set('n', '<Space>o', builtin.live_grep, {})
vim.keymap.set('n', '<Space>gc', builtin.git_commits, {})
vim.keymap.set('n', '<Space>gs', builtin.git_status, {})
vim.keymap.set('n', '<Space>gf', builtin.git_files, {})
vim.keymap.set('n', '<Space>7', builtin.current_buffer_fuzzy_find, {})
-- Bindings for save and quit
vim.api.nvim_set_keymap('n', '<Space>w', ':w<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<Space>q', ':q<CR>', {})

View file

@ -10,7 +10,8 @@ cmp.setup({
['<C-e>'] = cmp.mapping.abort(),
['<Up>'] = cmp.mapping.select_prev_item({ behavior = 'select' }),
['<Down>'] = cmp.mapping.select_next_item({ behavior = 'select' }),
['<Tab>'] = cmp.mapping.select_next_item({ behavior = 'select' }),
['<S-Tab>'] = cmp.mapping.select_prev_item({ behavior = 'insert' }),
['<Tab>'] = cmp.mapping.select_next_item({ behavior = 'insert' }),
['<C-p>'] = cmp.mapping(function()
if cmp.visible() then
cmp.select_prev_item({ behavior = 'insert' })

View file

@ -1,14 +1,9 @@
-- LSP Setup
local lsp_zero = require('lsp-zero')
lsp_zero.on_attach(function(client, bufnr)
lsp_zero.on_attach(function(bufnr)
lsp_zero.default_keymaps({ buffer = bufnr })
end)
require 'lspconfig'.hls.setup {}
require 'lspconfig'.omnisharp.setup {
cmd = { "/home/fw/.nix-profile/bin/dotnet", "/home/fw/.local/share/lvim/mason/packages/omnisharp/libexec/OmniSharp.dll" },
}
require 'lspconfig'.clojure_lsp.setup {}
require 'lspconfig'.nil_ls.setup {}
require 'lspconfig'.marksman.setup {}
require 'lspconfig'.pylsp.setup {}

View file

@ -1,12 +1,8 @@
require('lualine').hide()
require('lualine').setup {
options = {
-- icons_enabled = true,
icons_enabled = false,
theme = 'base16',
-- theme = 'catppuccin-mocha',
-- component_separators = { left = '', right = ''},
-- section_separators = { left = '', right = ''},
theme = 'catppuccin-mocha',
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
disabled_filetypes = {
@ -39,20 +35,8 @@ require('lualine').setup {
lualine_z = {}
},
tabline = {
-- lualine_a = {'buffers'},
-- lualine_b = {},
-- lualine_c = {},
-- lualine_x = {},
-- lualine_y = {},
-- lualine_z = {}
},
winbar = {
-- lualine_a = {'buffers'},
-- lualine_b = {},
-- lualine_c = {},
-- lualine_x = {},
-- lualine_y = {},
-- lualine_z = {}
},
inactive_winbar = {},
extensions = {}