Cleanup & fix minor errors
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
s = "python3 -m http.server 8080";
|
||||
vi = "nvim";
|
||||
vim = "nvim";
|
||||
g = "gitui"
|
||||
g = "gitui";
|
||||
};
|
||||
|
||||
interactiveShellInit = builtins.readFile ./config.fish;
|
||||
|
||||
@@ -14,14 +14,6 @@
|
||||
rainbow-delimiters-nvim
|
||||
neo-tree-nvim
|
||||
lualine-nvim
|
||||
nvim-treesitter.withPlugins (p: [
|
||||
p.lua
|
||||
p.c
|
||||
p.cpp
|
||||
p.nix
|
||||
p.ruby
|
||||
p.fish
|
||||
])
|
||||
nvim-cursorline
|
||||
conform-nvim
|
||||
nvim-cmp
|
||||
@@ -40,6 +32,14 @@
|
||||
rev = "5114853ed8f24661e48b726135bf78860d9339d5";
|
||||
};
|
||||
})
|
||||
|
||||
(nvim-treesitter.withPlugins (p: [
|
||||
p.c
|
||||
p.nix
|
||||
p.ruby
|
||||
p.lua
|
||||
p.cpp
|
||||
]))
|
||||
];
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
@@ -48,6 +48,6 @@
|
||||
stylua
|
||||
];
|
||||
|
||||
extraLuaConfig = builtins.readFile ./init.lua;
|
||||
initLua = builtins.readFile ./init.lua;
|
||||
};
|
||||
}
|
||||
|
||||
+33
-26
@@ -1,10 +1,12 @@
|
||||
-- Options
|
||||
local o = vim.opt
|
||||
vim.g.mapleader = " "
|
||||
vim.g.loaded_perl_provider = 0
|
||||
vim.g.loaded_ruby_provider = 0
|
||||
vim.g.clipboard = 'osc52'
|
||||
local g = vim.g
|
||||
g.mapleader = " "
|
||||
g.loaded_perl_provider = 0
|
||||
g.loaded_ruby_provider = 0
|
||||
g.clipboard = "osc52"
|
||||
o.number = true
|
||||
o.winborder = "rounded"
|
||||
o.expandtab = true
|
||||
o.shiftwidth = 2
|
||||
o.tabstop = 4
|
||||
@@ -31,17 +33,11 @@ o.mousescroll = "ver:0,hor:0"
|
||||
|
||||
vim.lsp.semantic_tokens.enable = false
|
||||
|
||||
vim.lsp.handlers.hover = function(_, result, ctx, config)
|
||||
config = config or {}
|
||||
config.border = "rounded"
|
||||
return vim.lsp.handlers.hover(_, result, ctx, config)
|
||||
end
|
||||
|
||||
vim.lsp.handlers.signature_help = function(_, result, ctx, config)
|
||||
config = config or {}
|
||||
config.border = "rounded"
|
||||
return vim.lsp.handlers.signature_help(_, result, ctx, config)
|
||||
end
|
||||
vim.diagnostic.config({
|
||||
float = {
|
||||
border = "rounded",
|
||||
},
|
||||
})
|
||||
|
||||
vim.g.rainbow_delimiters = {
|
||||
highlight = {
|
||||
@@ -73,13 +69,31 @@ vim.diagnostic.config({
|
||||
-- LSP config
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
require("lspconfig").lua_ls.setup({
|
||||
vim.lsp.config("lua_ls", {
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = {
|
||||
"vim",
|
||||
},
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
},
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.config("clangd", {
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
require("lspconfig").clangd.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
vim.lsp.enable("lua_ls")
|
||||
vim.lsp.enable("clangd")
|
||||
|
||||
-- Plugins
|
||||
require("picvim").setup({})
|
||||
@@ -124,12 +138,6 @@ require("lualine").setup({
|
||||
},
|
||||
})
|
||||
|
||||
require("nvim-treesitter.configs").setup({
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
})
|
||||
|
||||
require("nvim-cursorline").setup({
|
||||
cursorline = {
|
||||
enable = true,
|
||||
@@ -244,7 +252,6 @@ map("n", "<C-Down>", function()
|
||||
neoscroll.scroll(0.1, { move_cursor = false, duration = 50 })
|
||||
end)
|
||||
|
||||
|
||||
-- Vimscript stuff
|
||||
vim.cmd([[
|
||||
aunmenu PopUp
|
||||
|
||||
Reference in New Issue
Block a user