Skip to content

Commit 0b1856c

Browse files
author
Said Neder
committed
updating neovim settings
1 parent 8947e9a commit 0b1856c

25 files changed

+218
-145
lines changed

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
# My dotfiles
22

3-
Welcome to my dotfiles, these are my config files for desktop setup, being on two enviroments:
3+
Welcome to my dotfiles, these are my config files of my setup.
44

5-
- KDE (as my desktop enviroment)
65
- Qtile (as my window manager)
76

8-
Currently am using Fedora KDE 35, and feel free to clone and fork if you want to!
7+
Currently am using arch linux, and feel free to clone and fork if you want to!
98

10-
## My Qtile setup
9+
# My Qtile setup
1110
This is my WM setup that I use, based currently on One-Dark colour scheme, using the phinger cursors.
1211
![Qtile setup](archrice.png)
1312

14-
## My KDE desktop
15-
This is my new KDE setup based on the Snazzy colour scheme and the Crown-Global theme, using as well the phinger cursors.
16-
![KDE Desktop](kde.png)
13+
I miss a lot of documentation so in this days I will try to document it!
1714

18-
## The Software that I use
15+
# The Software that I use
1916

2017
| Name | Description |
2118
|-----------|---------------------------------|
@@ -30,4 +27,5 @@ This is my new KDE setup based on the Snazzy colour scheme and the Crown-Global
3027
| Nitrogen | For wallpapers |
3128
| Redshift | Take care of your eyes |
3229
| Rofi | Launch Menu |
33-
30+
31+
My next WM will be awesome! (literally)

alacritty/alacritty.yml

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,40 @@ font:
2525

2626
draw_bold_text_with_bright_colors: true
2727

28+
# onedark Alacritty Colors
2829
colors:
29-
30+
# Default colors
3031
primary:
31-
background: '#282a36'
32-
foreground: '#eff0eb'
33-
34-
cursor:
35-
cursor: '#97979b'
32+
background: '0x282c34'
33+
foreground: '0xabb2bf'
3634

35+
# Selection colors
3736
selection:
38-
text: '#282a36'
39-
background: '#feffff'
37+
text: CellForeground
38+
background: '0x393f4a'
4039

40+
# Normal colors
4141
normal:
42-
black: '#282a36'
43-
red: '#ff5c57'
44-
green: '#5af78e'
45-
yellow: '#f3f99d'
46-
blue: '#57c7ff'
47-
magenta: '#ff6ac1'
48-
cyan: '#9aedfe'
49-
white: '#f1f1f0'
42+
black: '0x20232A'
43+
red: '0xe86671'
44+
green: '0x98c379'
45+
yellow: '0xe0af68'
46+
blue: '0x61afef'
47+
magenta: '0xc678dd'
48+
cyan: '0x56b6c2'
49+
white: '0x798294'
5050

51+
# Bright colors
5152
bright:
52-
black: '#686868'
53-
red: '#ff5c57'
54-
green: '#5af78e'
55-
yellow: '#f3f99d'
56-
blue: '#57c7ff'
57-
magenta: '#ff6ac1'
58-
cyan: '#9aedfe'
59-
white: '#eff0eb'
53+
black: '0x21252b'
54+
red: '0xe86671'
55+
green: '0x98c379'
56+
yellow: '0xe0af68'
57+
blue: '0x61afef'
58+
magenta: '0xc678dd'
59+
cyan: '0x56b6c2'
60+
white: '0xabb2bf'
61+
62+
indexed_colors:
63+
- { index: 16, color: '0xd19a66' }
64+
- { index: 17, color: '0xf65866' }

archrice.png

-16.5 KB
Loading

kde.png

-3.04 MB
Binary file not shown.

nvim/init.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-- Packages
2-
require "plugins"
3-
require "keybindings"
4-
require "config"
5-
require "lsp"
6-
require "settings"
2+
require("plugins")
3+
require("keybindings")
4+
require("config")
5+
require("lsp")
6+
require("settings")

nvim/lua/config.lua

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
local set = vim.opt
2-
vim.cmd[[syntax on]]
3-
vim.cmd[[filetype plugin indent on]]
2+
vim.cmd([[syntax on]])
3+
vim.cmd([[filetype plugin indent on]])
44

55
-- Don't know what are you doing just seek for help!
66
-- :h expandtab
@@ -18,15 +18,15 @@ set.number = true
1818

1919
-- Enable spell checking
2020
set.spell = true
21-
set.spelllang = 'en_us'
22-
set.encoding = 'utf-8'
21+
set.spelllang = "en_us"
22+
set.encoding = "utf-8"
2323

2424
-- Splits orders
2525
set.splitbelow = true
2626
set.splitright = true
2727

2828
-- Syntax highlighting
29-
set.syntax = 'on'
29+
set.syntax = "on"
3030

3131
-- Show vim commands in the bottom line
3232
set.showcmd = true
@@ -35,12 +35,13 @@ set.showcmd = true
3535
set.breakindent = true
3636

3737
-- Colorscheme
38-
vim.cmd[[colorscheme dracula]]
38+
require("onedark").setup()
3939

4040
-- Setting some things up
41-
require('lualine').setup() -- Status line
42-
require('nvim-tree').setup() -- Sidebar file explorer
43-
require('cokeline').setup() -- Buffer line
44-
require('trouble').setup() -- Error linting
45-
require('Comment').setup() -- Commenting shortcuts
46-
require('nvim-autopairs').setup()
41+
require("lualine").setup() -- Status line
42+
require("nvim-tree").setup() -- Sidebar file explorer
43+
require("cokeline").setup() -- Buffer line
44+
require("trouble").setup() -- Error linting
45+
require("Comment").setup() -- Commenting shortcuts
46+
require("nvim-autopairs").setup() -- Auto closing tags
47+
require("neogit").setup() -- Git setup

nvim/lua/keybindings.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ keymap('n', '<c-l>', '<c-w>l', opts)
4545
-- keymap('v', '<Left>', '<Nop>', opts)
4646
-- keymap('v', '<Right>', '<Nop>', opts)
4747

48-
-- LSP keymaps
49-
normap('<leader>rn', ':lua vim.lsp.buf.rename()<cr>')
50-
5148
-- Telescope
5249
normap('<leader>ff', ":lua require('telescope.builtin').find_files()<cr>")
5350
normap('<leader>fg', ":lua require('telescope.builtin').live_grep()<cr>")
@@ -64,3 +61,6 @@ normap('P', ':PackerSync<CR>')
6461
normap('>', ':bnext<CR>')
6562
normap('<', ':bprevious<CR>')
6663
normap('<c-d>', ':bdelete<CR>')
64+
65+
-- Diagnostics
66+
normap('<leader>tr', ':TroubleToggle<cr>')

nvim/lua/lsp/lsp-installer.lua

Lines changed: 48 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,57 @@
11
local status_ok, lsp_installer = pcall(require, "nvim-lsp-installer")
22
if not status_ok then
3-
return
3+
return
44
end
55

66
-- Register a handler that will be called for all installed servers.
77
-- Alternatively, you may also register handlers on specific server instances instead (see example below).
88
lsp_installer.on_server_ready(function(server)
9-
local opts = {
10-
on_attach = require("lsp.handlers").on_attach,
11-
capabilities = require("lsp.handlers").capabilities,
12-
}
9+
local opts = {
10+
on_attach = require("lsp.handlers").on_attach,
11+
capabilities = require("lsp.handlers").capabilities,
12+
}
13+
-- Lua
14+
if server.name == "sumneko_lua" then
15+
local sumneko_opts = require("lsp.servers.sumneko_lua")
16+
opts = vim.tbl_deep_extend("force", sumneko_opts, opts)
17+
end
18+
-- CSS
19+
if server.name == "cssls" then
20+
local cssls_opts = require("lsp.servers.cssls")
21+
opts = vim.tbl_deep_extend("force", cssls_opts, opts)
22+
end
23+
-- HTML
24+
if server.name == "html" then
25+
local html_opts = require("lsp.servers.html")
26+
opts = vim.tbl_deep_extend("force", html_opts, opts)
27+
end
28+
-- Typescript
29+
if server.name == "tsserver" then
30+
local tsserver_opts = require("lsp.servers.tsserver")
31+
opts = vim.tbl_deep_extend("force", tsserver_opts, opts)
32+
end
33+
-- Python
34+
if server.name == "pyright" then
35+
local pyright_opts = require("lsp.servers.pyright")
36+
opts = vim.tbl_deep_extend("force", pyright_opts, opts)
37+
end
38+
-- LaTeX
39+
if server.name == "ltex" then
40+
local ltex_opts = require("lsp.servers.ltex")
41+
opts = vim.tbl_deep_extend("force", ltex_opts, opts)
42+
end
43+
-- Golang
44+
if server.name == "gopls" then
45+
local gopls_opts = require("lsp.servers.gopls")
46+
opts = vim.tbl_deep_extend("force", gopls_opts, opts)
47+
end
48+
-- Arduino
49+
if server.name == "arduino-language-server" then
50+
local arduino_opts = require("lsp.servers.arduino-language-server")
51+
opts = vim.tbl_deep_extend("force", arduino_opts, opts)
52+
end
1353

14-
if server.name == "sumneko_lua" then
15-
local sumneko_opts = require("lsp.servers.sumneko_lua")
16-
opts = vim.tbl_deep_extend("force", sumneko_opts, opts)
17-
end
18-
19-
if server.name == "cssls" then
20-
local cssls_opts = require("lsp.servers.cssls")
21-
opts = vim.tbl_deep_extend("force", cssls_opts, opts)
22-
end
23-
24-
if server.name == "html" then
25-
local html_opts = require("lsp.servers.html")
26-
opts = vim.tbl_deep_extend("force", html_opts, opts)
27-
end
28-
29-
if server.name == "zk" then
30-
local zk_opts = require("lsp.servers.zk")
31-
opts = vim.tbl_deep_extend("force", zk_opts, opts)
32-
end
33-
34-
-- This setup() function is exactly the same as lspconfig's setup function.
35-
-- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
36-
server:setup(opts)
54+
-- This setup() function is exactly the same as lspconfig's setup function.
55+
-- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
56+
server:setup(opts)
3757
end)

nvim/lua/lsp/servers/arduinolsp.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
return {
2+
cmd = {"arduino-language-server", "--cli-config", "/home/said/.arduino15/arduino-cli.yaml"},
3+
filetypes = {"arduino"}
4+
}

nvim/lua/lsp/servers/gopls.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
return {
2+
cmd = {"gopls"},
3+
filetypes = { "go", "gomod", "gotmpl" },
4+
single_file_support = true
5+
}

0 commit comments

Comments
 (0)