From 51bd0843facea4c9bf0c1cbdfec9ba690ce48fdd Mon Sep 17 00:00:00 2001 From: Jan Date: Fri, 1 Nov 2024 16:11:13 +0100 Subject: [PATCH 1/4] Changed some options --- init.lua | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/init.lua b/init.lua index 834baf43ec1..a5eeb23aad7 100644 --- a/init.lua +++ b/init.lua @@ -92,7 +92,13 @@ require('lazy').setup({ 'folke/neodev.nvim', }, }, - + -- { + -- "L3MON4D3/LuaSnip", + -- -- follow latest release. + -- version = "v2.*", -- Replace by the latest released major (first number of latest release) + -- -- install jsregexp (optional!). + -- build = "make install_jsregexp" + -- }, { -- Autocompletion 'hrsh7th/nvim-cmp', @@ -234,6 +240,9 @@ vim.o.hlsearch = false -- Make line numbers default vim.wo.number = true +-- Set relativ line numbers +vim.wo.relativenumber = true + -- Enable mouse mode vim.o.mouse = 'a' @@ -447,12 +456,13 @@ end -- If you want to override the default filetypes that your language server will attach to you can -- define the property 'filetypes' to the map in question. local servers = { - -- clangd = {}, - -- gopls = {}, - -- pyright = {}, - -- rust_analyzer = {}, - -- tsserver = {}, - -- html = { filetypes = { 'html', 'twig', 'hbs'} }, + clangd = {}, + gopls = {}, + julials = {}, + pyright = {}, + rust_analyzer = {}, + tsserver = {}, + html = { filetypes = { 'html', 'twig', 'hbs'} }, lua_ls = { Lua = { From 2708c0d51719a807cee2cf3736c9fdbeff49f745 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 7 Apr 2025 15:27:29 +0200 Subject: [PATCH 2/4] Idk, some changes --- init.lua | 44 +++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/init.lua b/init.lua index 4ce35f4b5c4..9313d89e9f4 100644 --- a/init.lua +++ b/init.lua @@ -102,7 +102,7 @@ vim.g.have_nerd_font = false vim.opt.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.opt.relativenumber = true +vim.opt.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' @@ -614,18 +614,22 @@ require('lazy').setup({ -- - settings (table): Override the default settings passed when initializing the server. -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { - -- clangd = {}, - -- gopls = {}, - -- pyright = {}, - -- rust_analyzer = {}, + clangd = {}, + gopls = {}, + pyright = {}, + rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- -- Some languages (like typescript) have entire language plugins that can be useful: -- https://github.com/pmizio/typescript-tools.nvim -- -- But for many setups, the LSP (`ts_ls`) will work just fine - -- ts_ls = {}, - -- + ts_ls = {}, + -- csharp_ls = {}, + cmake = {}, + bashls = {}, + html = {}, + -- java_language_server = {}, lua_ls = { -- cmd = {...}, @@ -838,13 +842,22 @@ require('lazy').setup({ -- change the command in the config to whatever the name of that colorscheme is. -- -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. - 'folke/tokyonight.nvim', + -- 'folke/tokyonight.nvim', + 'navarasu/onedark.nvim', priority = 1000, -- Make sure to load this before all the other start plugins. init = function() + -- TODO: Figure out how to change line number color + -- https://github.com/navarasu/onedark.nvim + -- https://github.com/navarasu/onedark.nvim/blob/master/lua/onedark/highlights.lua#L133-L257 + -- https://www.reddit.com/r/neovim/comments/mwyzxn/how_to_change_the_color_of_line_numbering/ + -- https://stackoverflow.com/questions/75277938/need-to-change-the-colour-of-line-numbers-in-neovim + -- maybe try opts = {} as that should be equivalent of setup({}) + -- Load the colorscheme here. -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'tokyonight-night' + -- vim.cmd.colorscheme 'tokyonight-night' + vim.cmd.colorscheme 'onedark' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' @@ -897,7 +910,8 @@ require('lazy').setup({ main = 'nvim-treesitter.configs', -- Sets main module to use for opts -- [[ Configure Treesitter ]] See `:help nvim-treesitter` opts = { - ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, + -- ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, + ensure_installed = 'all', -- Autoinstall languages that are not installed auto_install = true, highlight = { @@ -930,8 +944,9 @@ require('lazy').setup({ -- require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.lint', -- require 'kickstart.plugins.autopairs', + -- TODO: Look into neotree to replace netrw -- require 'kickstart.plugins.neo-tree', - -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. @@ -965,5 +980,12 @@ require('lazy').setup({ }, }) +vim.opt.foldmethod = 'expr' +vim.opt.foldexpr = 'nvim_treesitter#foldexpr()' +-- TODO: Write foldtext function to have both line count and TS syntax highlighting +-- vim.opt.foldtext = '' +vim.opt.foldlevelstart = 0 +vim.opt.foldnestmax = 4 + -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et From 7a9360f899754fd5fdc5c460fc5920e0e71fd303 Mon Sep 17 00:00:00 2001 From: Jan Date: Sat, 24 May 2025 15:53:48 +0200 Subject: [PATCH 3/4] Changed color scheme and lsp keybinds --- init.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index ffdd84c90c6..ab88525ec40 100644 --- a/init.lua +++ b/init.lua @@ -210,7 +210,7 @@ vim.api.nvim_create_autocmd('TextYankPost', { desc = 'Highlight when yanking (copying) text', group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }), callback = function() - vim.highlight.on_yank() + vim.hl.on_yank() end, }) @@ -545,11 +545,11 @@ require('lazy').setup({ -- Jump to the definition of the word under your cursor. -- This is where a variable was first declared, or where a function is defined, etc. -- To jump back, press . - map('grd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') + map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') -- WARN: This is not Goto Definition, this is Goto Declaration. -- For example, in C this would take you to the header. - map('grD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') + map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') -- Fuzzy find all the symbols in your current document. -- Symbols are things like variables, functions, types, etc. @@ -877,8 +877,8 @@ require('lazy').setup({ -- change the command in the config to whatever the name of that colorscheme is. -- -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. - 'folke/tokyonight.nvim', - -- 'navarasu/onedark.nvim', + -- 'folke/tokyonight.nvim', + 'navarasu/onedark.nvim', priority = 1000, -- Make sure to load this before all the other start plugins. -- init = function() -- TODO: Figure out how to change line number color @@ -889,7 +889,7 @@ require('lazy').setup({ -- maybe try opts = {} as that should be equivalent of setup({}) config = function() ---@diagnostic disable-next-line: missing-fields - require('tokyonight').setup { + require('onedark').setup { styles = { comments = { italic = false }, -- Disable italics in comments }, @@ -898,8 +898,8 @@ require('lazy').setup({ -- Load the colorscheme here. -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'tokyonight-night' - -- vim.cmd.colorscheme 'onedark' + -- vim.cmd.colorscheme 'tokyonight-night' + vim.cmd.colorscheme 'onedark' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' From 95a4d7c07d1f9304fd62d43960fa0e3029e2e8d5 Mon Sep 17 00:00:00 2001 From: Jan Date: Sun, 19 Apr 2026 17:05:42 +0200 Subject: [PATCH 4/4] Added opencl --- init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 73b61cd4db0..46e0e43d805 100644 --- a/init.lua +++ b/init.lua @@ -702,6 +702,10 @@ require('lazy').setup({ }, }, }, + + opencl_ls = { + filetypes = { 'opencl', 'cl' }, + }, } -- Ensure the servers and tools above are installed @@ -833,7 +837,7 @@ require('lazy').setup({ -- -- All presets have the following mappings: -- /: move to right/left of your snippet expansion - -- : Open menu or open docs if already open + -- : cpen menu or open docs if already open -- / or /: Select next/previous item -- : Hide menu -- : Toggle signature help